summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channels.h6
-rw-r--r--include/configreader.h16
-rw-r--r--include/dynamic.h4
-rw-r--r--include/inspircd.h2
-rw-r--r--include/inspsocket.h2
-rw-r--r--include/modules.h4
-rw-r--r--include/usermanager.h4
-rw-r--r--include/users.h2
8 files changed, 19 insertions, 21 deletions
diff --git a/include/channels.h b/include/channels.h
index 3419e4c69..aa23d8816 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -371,7 +371,7 @@ class CoreExport Channel : public Extensible
* @param text A printf-style format string which builds the output line without prefix
* @param ... Zero or more POD types
*/
- void WriteChannel(User* user, char* text, ...);
+ void WriteChannel(User* user, const char* text, ...);
/** Write to a channel, from a user, using std::string for text
* @param user User whos details to prefix the line with
@@ -401,7 +401,7 @@ class CoreExport Channel : public Extensible
* @param text A printf-style format string which builds the output line without prefix
* @param ... Zero or more POD type
*/
- void WriteAllExceptSender(User* user, bool serversource, char status, char* text, ...);
+ void WriteAllExceptSender(User* user, bool serversource, char status, const char* text, ...);
/** Write to all users on a channel except a list of users, using va_args for text
* @param user User whos details to prefix the line with, and to omit from receipt of the message
@@ -412,7 +412,7 @@ class CoreExport Channel : public Extensible
* @param text A printf-style format string which builds the output line without prefix
* @param ... Zero or more POD type
*/
- void WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, char* text, ...);
+ void WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const char* text, ...);
/** Write to all users on a channel except a specific user, using std::string for text.
* Internally, this calls WriteAllExcept().
diff --git a/include/configreader.h b/include/configreader.h
index fb187048b..e74895e8b 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -68,10 +68,8 @@ class ValueItem
/** Initialize with a bool */
ValueItem(bool value);
/** Initialize with a char pointer */
- ValueItem(char* value);
+ ValueItem(const char* value);
/** Change value to a char pointer */
- void Set(char* value);
- /** Change value to a const char pointer */
void Set(const char* val);
/** Change value to an int */
void Set(int value);
@@ -166,11 +164,11 @@ typedef bool (*MultiNotify)(ServerConfig* conf, const char*);
struct InitialConfig
{
/** Tag name */
- char* tag;
+ const char* tag;
/** Value name */
- char* value;
+ const char* value;
/** Default, if not defined */
- char* default_value;
+ const char* default_value;
/** Value containers */
ValueContainerBase* val;
/** Data types */
@@ -187,9 +185,9 @@ struct MultiConfig
/** Tag name */
const char* tag;
/** One or more items within tag */
- char* items[18];
+ const char* items[18];
/** One or more defaults for items within tags */
- char* items_default[18];
+ const char* items_default[18];
/** One or more data types */
int datatype[18];
/** Initialization function */
@@ -240,7 +238,7 @@ class CoreExport ServerConfig : public Extensible
/** Check that there is only one of each configuration item
*/
- bool CheckOnce(char* tag);
+ bool CheckOnce(const char* tag);
public:
diff --git a/include/dynamic.h b/include/dynamic.h
index 4cf299c1f..727ed11e1 100644
--- a/include/dynamic.h
+++ b/include/dynamic.h
@@ -23,7 +23,7 @@ class CoreExport DLLManager
/** The last error string, or NULL
*/
- char *err;
+ const char *err;
public:
/** This constructor loads the module using dlopen()
@@ -44,7 +44,7 @@ class CoreExport DLLManager
/** Get the last error from dlopen() or dlsym().
* @return The last error string, or NULL if no error has occured.
*/
- char* LastError()
+ const char* LastError()
{
return err;
}
diff --git a/include/inspircd.h b/include/inspircd.h
index d1e6f4005..5fd641c6b 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -478,7 +478,7 @@ class CoreExport InspIRCd : public classbase
* @param addr The address to bind to (IP only)
* @return True if the port was bound successfully
*/
- bool BindSocket(int sockfd, int port, char* addr, bool dolisten = true);
+ bool BindSocket(int sockfd, int port, const char* addr, bool dolisten = true);
/** Adds a server name to the list of servers we've seen
* @param The servername to add
diff --git a/include/inspsocket.h b/include/inspsocket.h
index 77c283f7f..d33cde5e8 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -318,7 +318,7 @@ class CoreExport BufferedSocket : public EventHandler
* into a char* array which can be up to
* 16 kilobytes in length.
*/
- virtual char* Read();
+ virtual const char* Read();
/**
* Returns the IP address associated with
diff --git a/include/modules.h b/include/modules.h
index 09b1f954b..6a08aaec6 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -335,7 +335,7 @@ class CoreExport Request : public ModuleMessage
* sent the request to. It is up to your module to know what this data is and
* how to deal with it.
*/
- char* Send();
+ const char* Send();
};
@@ -1195,7 +1195,7 @@ class CoreExport Module : public Extensible
* may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).
* @param request The Request class being received
*/
- virtual char* OnRequest(Request* request);
+ virtual const char* OnRequest(Request* request);
/** Called whenever a password check is to be made. Replaces the old OldOperCompare API.
* The password field (from the config file) is in 'password' and is to be compared against
diff --git a/include/usermanager.h b/include/usermanager.h
index 33b97129a..0fe418ba3 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -138,13 +138,13 @@ class CoreExport UserManager : public classbase
* @param text The text format string to send
* @param ... The format arguments
*/
- void ServerNoticeAll(char* text, ...);
+ void ServerNoticeAll(const char* text, ...);
/** Send a server message (PRIVMSG) to all local users
* @param text The text format string to send
* @param ... The format arguments
*/
- void ServerPrivmsgAll(char* text, ...);
+ void ServerPrivmsgAll(const char* text, ...);
/** Send text to all users with a specific set of modes
* @param modes The modes to check against, without a +, e.g. 'og'
diff --git a/include/users.h b/include/users.h
index 507fdf97b..a63dd7cc6 100644
--- a/include/users.h
+++ b/include/users.h
@@ -1033,7 +1033,7 @@ class CoreExport User : public connection
* @param text The text format string to send
* @param ... Format arguments
*/
- void SendAll(const char* command, char* text, ...);
+ void SendAll(const char* command, const char* text, ...);
/** Compile a channel list for this user, and send it to the user 'source'
* Used internally by WHOIS