- irc.c, irc.h: const-correctness
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Mon, 12 Jan 2015 21:11:53 +0000 (21:11 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Mon, 12 Jan 2015 21:11:53 +0000 (21:11 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@5370 82007160-df01-0410-b94d-b575c5fd34c7

src/irc.c
src/irc.h

index 41dde665b5767d64cb497e05987572a39b5f9351..75ab94b5d985a9cf39ecf162bab8722aa71e0706 100644 (file)
--- a/src/irc.c
+++ b/src/irc.c
@@ -63,15 +63,15 @@ static struct ChannelConf *get_channel(const char *);
 static struct UserInfo *userinfo_create(char *);
 static void userinfo_free(struct UserInfo *source);
 
-static void m_ping(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_invite(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_privmsg(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_ctcp(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_notice(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_perform(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_userhost(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_cannot_join(char *[], unsigned int, char *, const struct UserInfo *);
-static void m_kill(char *[], unsigned int, char *, const struct UserInfo *);
+static void m_ping(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_invite(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_privmsg(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_ctcp(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_notice(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_perform(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_userhost(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_cannot_join(char *[], unsigned int, const char *, const struct UserInfo *);
+static void m_kill(char *[], unsigned int, const char *, const struct UserInfo *);
 
 
 /*
@@ -664,7 +664,7 @@ userinfo_free(struct UserInfo *source_p)
  * the source (parv[0]) is a server.
  */
 static void
-m_perform(char *parv[], unsigned int parc, char *msg, const struct UserInfo *notused)
+m_perform(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *notused)
 {
   node_t *node;
 
@@ -713,7 +713,7 @@ m_perform(char *parv[], unsigned int parc, char *msg, const struct UserInfo *not
  * the source (parv[0]) is a server.
  */
 static void
-m_ping(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_ping(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   if (parc < 3)
     return;
@@ -735,7 +735,7 @@ m_ping(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source
  * the source (parv[0]) is a server.
  */
 static void
-m_invite(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_invite(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   struct ChannelConf *channel = NULL;
 
@@ -761,7 +761,7 @@ m_invite(char *parv[], unsigned int parc, char *msg, const struct UserInfo *sour
  * the source (parv[0]) is a server.
  */
 static void
-m_privmsg(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_privmsg(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   struct ChannelConf *channel = NULL;
   size_t nick_len;
@@ -810,7 +810,7 @@ m_privmsg(char *parv[], unsigned int parc, char *msg, const struct UserInfo *sou
  *
  */
 static void
-m_ctcp(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_ctcp(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   if (strncasecmp(parv[3], "\001VERSION\001", 9) == 0)
     irc_send("NOTICE %s :\001VERSION Hybrid Open Proxy Monitor %s\001",
@@ -830,7 +830,7 @@ m_ctcp(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source
  *
  */
 static void
-m_notice(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_notice(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   static regex_t *preg = NULL;
   regmatch_t pmatch[5];
@@ -918,7 +918,7 @@ m_notice(char *parv[], unsigned int parc, char *msg, const struct UserInfo *sour
  *
  */
 static void
-m_userhost(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_userhost(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   if (parc < 4)
     return;
@@ -936,7 +936,7 @@ m_userhost(char *parv[], unsigned int parc, char *msg, const struct UserInfo *so
  *
  */
 static void
-m_cannot_join(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_cannot_join(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   const struct ChannelConf *channel = NULL;
 
@@ -963,7 +963,7 @@ m_cannot_join(char *parv[], unsigned int parc, char *msg, const struct UserInfo
  *
  */
 static void
-m_kill(char *parv[], unsigned int parc, char *msg, const struct UserInfo *source_p)
+m_kill(char *parv[], unsigned int parc, const char *msg, const struct UserInfo *source_p)
 {
   /* Restart hopm to rehash */
   main_restart();
index 1ddf798acfbee527f155a76e516d2853f5acf9cd..eba28c4578a99a22a07f2ebc485b5616f888c904 100644 (file)
--- a/src/irc.h
+++ b/src/irc.h
@@ -36,7 +36,7 @@ struct UserInfo
 struct CommandHash
 {
   const char *command;
-  void (*handler)(char *[], unsigned int, char *, const struct UserInfo *);
+  void (*handler)(char *[], unsigned int, const char *, const struct UserInfo *);
 };
 
 extern void irc_send(const char *, ...);