diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
| commit | c32c3c99a1e1d395c88e901de200c21b9ca1e84f (patch) | |
| tree | e272e1dc395df2947314ff24f0f9ce12b94f8f53 /src/protocol/ptlink.c | |
| parent | 431918ceacfd5a580d4f28a8ae6077c9bbc44b99 (diff) | |
Made all protocol modules able to be compiled via mostly constifying strings.
Due to the above, also had to constify strings in many other areas.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1202 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/ptlink.c')
| -rw-r--r-- | src/protocol/ptlink.c | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/src/protocol/ptlink.c b/src/protocol/ptlink.c index be1c3e3b1..78c200c2d 100644 --- a/src/protocol/ptlink.c +++ b/src/protocol/ptlink.c @@ -385,7 +385,7 @@ CUMode myCumodes[128] = { -void ptlink_cmd_bot_chan_mode(char *nick, char *chan) +void ptlink_cmd_bot_chan_mode(const char *nick, const char *chan) { anope_cmd_mode(s_ChanServ, chan, "%s %s %s", ircd->botchanumode, nick, nick); @@ -401,7 +401,7 @@ void ptlink_cmd_bot_chan_mode(char *nick, char *chan) parv[4+n] = flags+nick list (all in one parameter) NOTE: ignore channel modes if we already have the channel with a gr */ -int anope_event_sjoin(char *source, int ac, char **av) +int anope_event_sjoin(const char *source, int ac, const char **av) { do_sjoin(source, ac, av); return MOD_CONT; @@ -418,10 +418,10 @@ int anope_event_sjoin(char *source, int ac, char **av) parv[0] = sender parv[1] = new mask (if no '@', hostname is assumed) */ -int anope_event_newmask(char *source, int ac, char **av) +int anope_event_newmask(const char *source, int ac, const char **av) { User *u; - char *newhost = NULL, *newuser = NULL; + const char *newhost = NULL, *newuser = NULL; int tofree = 0; if (ac != 1) @@ -451,8 +451,8 @@ int anope_event_newmask(char *source, int ac, char **av) if (newuser) { newhost = myStrGetTokenRemainder(av[0], '@', 1); tofree = 1; - change_user_username(u, newuser); - free(newuser); + u->SetIdent(newuser); + free((char *)newuser); } else { newhost = av[0]; } @@ -463,10 +463,10 @@ int anope_event_newmask(char *source, int ac, char **av) u->mode |= UMODE_VH; if (newhost) - change_user_host(u, newhost); + u->SetDisplayedHost(newhost); if (tofree) - free(newhost); + free((char *)newhost); return MOD_CONT; } @@ -494,7 +494,7 @@ int anope_event_newmask(char *source, int ac, char **av) 0 1 2 3 4 5 6 7 8 */ -int anope_event_nick(char *source, int ac, char **av) +int anope_event_nick(const char *source, int ac, const char **av) { User *user; @@ -518,7 +518,7 @@ int anope_event_nick(char *source, int ac, char **av) parv[3] = server version parv[4] = server description */ -int anope_event_server(char *source, int ac, char **av) +int anope_event_server(const char *source, int ac, const char **av) { if (!stricmp(av[1], "1")) { uplink = sstrdup(av[0]); @@ -527,7 +527,7 @@ int anope_event_server(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_436(char *source, int ac, char **av) +int anope_event_436(const char *source, int ac, const char **av) { if (ac < 1) return MOD_CONT; @@ -644,18 +644,18 @@ void moduleAddIRCDMsgs(void) addCoreMessage(IRCD, m); } -int anope_event_svsinfo(char *source, int ac, char **av) +int anope_event_svsinfo(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_svinfo(char *source, int ac, char **av) +int anope_event_svinfo(const char *source, int ac, const char **av) { return MOD_CONT; } /* Event: PROTOCTL */ -int anope_event_capab(char *source, int ac, char **av) +int anope_event_capab(const char *source, int ac, const char **av) { capab_parse(ac, av); return MOD_CONT; @@ -667,7 +667,7 @@ int anope_event_capab(char *source, int ac, char **av) parv[1] = sqlined nick/mask parv[2] = reason */ -void ptlink_cmd_sqline(char *mask, char *reason) +void ptlink_cmd_sqline(const char *mask, const char *reason) { send_cmd(ServerName, "SQLINE %s :%s", mask, reason); } @@ -685,7 +685,7 @@ void PTlinkProto::cmd_svsnoop(const char *server, int set) send_cmd(NULL, "SVSADMIN %s :%s", server, set ? "noopers" : "rehash"); } -void ptlink_cmd_svsadmin(char *server, int set) +void ptlink_cmd_svsadmin(const char *server, int set) { ircd_proto.cmd_svsnoop(server, set); } @@ -717,12 +717,12 @@ void anope_topic(char *whosets, char *chan, char *whosetit, char *topic, parv[0] = sender parv[1] = sqlined nick/mask */ -void ptlink_cmd_unsqline(char *user) +void ptlink_cmd_unsqline(const char *user) { send_cmd(NULL, "UNSQLINE %s", user); } -void ptlink_cmd_join(char *user, char *channel, time_t chantime) +void ptlink_cmd_join(const char *user, const char *channel, time_t chantime) { send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) chantime, channel, user); @@ -736,15 +736,15 @@ void ptlink_cmd_join(char *user, char *channel, time_t chantime) parv[3] = who added the gline parv[4] = reason */ -void ptlink_cmd_akill(char *user, char *host, char *who, time_t when, - time_t expires, char *reason) +void ptlink_cmd_akill(const char *user, const char *host, const char *who, time_t when, + time_t expires, const char *reason) { send_cmd(ServerName, "GLINE %s@%s %i %s :%s", user, host, 86400 * 2, who, reason); } -void ptlink_cmd_svskill(char *source, char *user, char *buf) +void ptlink_cmd_svskill(const char *source, const char *user, const char *buf) { if (!buf) { return; @@ -765,7 +765,7 @@ void ptlink_cmd_svskill(char *source, char *user, char *buf) parv[3] = extra parameter ( if news setting mode(+n) ) e.g.: :NickServ SVSMODE Lamego +rn 1991234 */ -void ptlink_cmd_svsmode(User * u, int ac, char **av) +void ptlink_cmd_svsmode(User * u, int ac, const char **av) { send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0], (ac == 2 ? " " : ""), (ac == 2 ? av[1] : "")); @@ -782,7 +782,7 @@ void ptlink_cmd_svsmode(User * u, int ac, char **av) u->mode |= UMODE_NM; } -int anope_event_error(char *source, int ac, char **av) +int anope_event_error(const char *source, int ac, const char **av) { if (ac >= 1) { if (debug) { @@ -792,13 +792,13 @@ int anope_event_error(char *source, int ac, char **av) return MOD_CONT; } -void ptlink_cmd_squit(char *servname, char *message) +void ptlink_cmd_squit(const char *servname, const char *message) { send_cmd(NULL, "SQUIT %s :%s", servname, message); } /* PONG */ -void ptlink_cmd_pong(char *servname, char *who) +void ptlink_cmd_pong(const char *servname, const char *who) { send_cmd(servname, "PONG %s", who); } @@ -841,7 +841,7 @@ void ptlink_cmd_svsinfo() (TS indicates this is server uses TS protocol and SVINFO will be sent for protocol compatibility checking) */ -void ptlink_cmd_pass(char *pass) +void ptlink_cmd_pass(const char *pass) { send_cmd(NULL, "PASS %s :TS", pass); } @@ -856,7 +856,7 @@ void ptlink_cmd_capab() } -void ptlink_cmd_server(char *servname, int hop, char *descript) +void ptlink_cmd_server(const char *servname, int hop, const char *descript) { send_cmd(NULL, "SERVER %s %d Anope.Services%s :%s", servname, hop, version_number_dotted, descript); @@ -881,7 +881,7 @@ void ptlink_cmd_connect(int servernum) -int anope_event_privmsg(char *source, int ac, char **av) +int anope_event_privmsg(const char *source, int ac, const char **av) { if (ac != 2) return MOD_CONT; @@ -889,7 +889,7 @@ int anope_event_privmsg(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_part(char *source, int ac, char **av) +int anope_event_part(const char *source, int ac, const char **av) { if (ac < 1 || ac > 2) return MOD_CONT; @@ -897,7 +897,7 @@ int anope_event_part(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_whois(char *source, int ac, char **av) +int anope_event_whois(const char *source, int ac, const char **av) { if (source && ac >= 1) { m_whois(source, av[0]); @@ -913,7 +913,7 @@ int anope_event_whois(char *source, int ac, char **av) parv[3] = topic time parv[4] = topic text */ -int anope_event_topic(char *source, int ac, char **av) +int anope_event_topic(const char *source, int ac, const char **av) { if (ac != 4) return MOD_CONT; @@ -921,7 +921,7 @@ int anope_event_topic(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_squit(char *source, int ac, char **av) +int anope_event_squit(const char *source, int ac, const char **av) { if (ac != 2) return MOD_CONT; @@ -929,7 +929,7 @@ int anope_event_squit(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_quit(char *source, int ac, char **av) +int anope_event_quit(const char *source, int ac, const char **av) { if (ac != 1) return MOD_CONT; @@ -943,7 +943,7 @@ int anope_event_quit(char *source, int ac, char **av) parv[1] = target nick (==sender) parv[2] = mode change string */ -int anope_event_mode(char *source, int ac, char **av) +int anope_event_mode(const char *source, int ac, const char **av) { if (ac < 2) return MOD_CONT; @@ -957,7 +957,7 @@ int anope_event_mode(char *source, int ac, char **av) } -int anope_event_kill(char *source, int ac, char **av) +int anope_event_kill(const char *source, int ac, const char **av) { if (ac != 2) return MOD_CONT; @@ -966,7 +966,7 @@ int anope_event_kill(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_kick(char *source, int ac, char **av) +int anope_event_kick(const char *source, int ac, const char **av) { if (ac != 3) return MOD_CONT; @@ -975,7 +975,7 @@ int anope_event_kick(char *source, int ac, char **av) } -int anope_event_join(char *source, int ac, char **av) +int anope_event_join(const char *source, int ac, const char **av) { if (ac != 1) return MOD_CONT; @@ -983,7 +983,7 @@ int anope_event_join(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_motd(char *source, int ac, char **av) +int anope_event_motd(const char *source, int ac, const char **av) { if (!source) { return MOD_CONT; @@ -993,7 +993,7 @@ int anope_event_motd(char *source, int ac, char **av) return MOD_CONT; } -void ptlink_cmd_notice_ops(char *source, char *dest, char *buf) +void ptlink_cmd_notice_ops(const char *source, const char *dest, const char *buf) { if (!buf) { return; @@ -1003,7 +1003,7 @@ void ptlink_cmd_notice_ops(char *source, char *dest, char *buf) } -void ptlink_cmd_notice(char *source, char *dest, char *buf) +void ptlink_cmd_notice(const char *source, const char *dest, const char *buf) { if (!buf) { return; @@ -1016,12 +1016,12 @@ void ptlink_cmd_notice(char *source, char *dest, char *buf) } } -void ptlink_cmd_notice2(char *source, char *dest, char *msg) +void ptlink_cmd_notice2(const char *source, const char *dest, const char *msg) { send_cmd(source, "NOTICE %s :%s", dest, msg); } -void ptlink_cmd_privmsg(char *source, char *dest, char *buf) +void ptlink_cmd_privmsg(const char *source, const char *dest, const char *buf) { if (!buf) { return; @@ -1030,23 +1030,23 @@ void ptlink_cmd_privmsg(char *source, char *dest, char *buf) send_cmd(source, "PRIVMSG %s :%s", dest, buf); } -void ptlink_cmd_privmsg2(char *source, char *dest, char *msg) +void ptlink_cmd_privmsg2(const char *source, const char *dest, const char *msg) { send_cmd(source, "PRIVMSG %s :%s", dest, msg); } -void ptlink_cmd_serv_notice(char *source, char *dest, char *msg) +void ptlink_cmd_serv_notice(const char *source, const char *dest, const char *msg) { send_cmd(source, "NOTICE $%s :%s", dest, msg); } -void ptlink_cmd_serv_privmsg(char *source, char *dest, char *msg) +void ptlink_cmd_serv_privmsg(const char *source, const char *dest, const char *msg) { send_cmd(source, "PRIVMSG $%s :%s", dest, msg); } /* GLOBOPS */ -void ptlink_cmd_global(char *source, char *buf) +void ptlink_cmd_global(const char *source, const char *buf) { if (!buf) { return; @@ -1056,7 +1056,7 @@ void ptlink_cmd_global(char *source, char *buf) } /* 391 */ -void ptlink_cmd_391(char *source, char *timestr) +void ptlink_cmd_391(const char *source, const char *timestr) { if (!timestr) { return; @@ -1065,7 +1065,7 @@ void ptlink_cmd_391(char *source, char *timestr) } /* 250 */ -void ptlink_cmd_250(char *buf) +void ptlink_cmd_250(const char *buf) { if (!buf) { return; @@ -1075,7 +1075,7 @@ void ptlink_cmd_250(char *buf) } /* 307 */ -void ptlink_cmd_307(char *buf) +void ptlink_cmd_307(const char *buf) { if (!buf) { return; @@ -1085,7 +1085,7 @@ void ptlink_cmd_307(char *buf) } /* 311 */ -void ptlink_cmd_311(char *buf) +void ptlink_cmd_311(const char *buf) { if (!buf) { return; @@ -1095,7 +1095,7 @@ void ptlink_cmd_311(char *buf) } /* 312 */ -void ptlink_cmd_312(char *buf) +void ptlink_cmd_312(const char *buf) { if (!buf) { return; @@ -1105,7 +1105,7 @@ void ptlink_cmd_312(char *buf) } /* 317 */ -void ptlink_cmd_317(char *buf) +void ptlink_cmd_317(const char *buf) { if (!buf) { return; @@ -1115,7 +1115,7 @@ void ptlink_cmd_317(char *buf) } /* 219 */ -void ptlink_cmd_219(char *source, char *letter) +void ptlink_cmd_219(const char *source, const char *letter) { if (!source) { return; @@ -1130,7 +1130,7 @@ void ptlink_cmd_219(char *source, char *letter) } /* 401 */ -void ptlink_cmd_401(char *source, char *who) +void ptlink_cmd_401(const char *source, const char *who) { if (!source || !who) { return; @@ -1139,7 +1139,7 @@ void ptlink_cmd_401(char *source, char *who) } /* 318 */ -void ptlink_cmd_318(char *source, char *who) +void ptlink_cmd_318(const char *source, const char *who) { if (!source || !who) { return; @@ -1149,7 +1149,7 @@ void ptlink_cmd_318(char *source, char *who) } /* 242 */ -void ptlink_cmd_242(char *buf) +void ptlink_cmd_242(const char *buf) { if (!buf) { return; @@ -1159,7 +1159,7 @@ void ptlink_cmd_242(char *buf) } /* 243 */ -void ptlink_cmd_243(char *buf) +void ptlink_cmd_243(const char *buf) { if (!buf) { return; @@ -1169,7 +1169,7 @@ void ptlink_cmd_243(char *buf) } /* 211 */ -void ptlink_cmd_211(char *buf) +void ptlink_cmd_211(const char *buf) { if (!buf) { return; @@ -1178,7 +1178,7 @@ void ptlink_cmd_211(char *buf) send_cmd(NULL, "211 %s", buf); } -void ptlink_cmd_mode(char *source, char *dest, char *buf) +void ptlink_cmd_mode(const char *source, const char *dest, const char *buf) { if (!buf) { return; @@ -1199,7 +1199,7 @@ void ptlink_cmd_mode(char *source, char *dest, char *buf) parv[8] = server parv[9] = nick info */ -void ptlink_cmd_nick(char *nick, char *name, char *mode) +void ptlink_cmd_nick(const char *nick, const char *name, const char *mode) { EnforceQlinedNick(nick, NULL); send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick, @@ -1208,7 +1208,7 @@ void ptlink_cmd_nick(char *nick, char *name, char *mode) ptlink_cmd_sqline(nick, "Reserved for services"); } -void ptlink_cmd_kick(char *source, char *chan, char *user, char *buf) +void ptlink_cmd_kick(const char *source, const char *chan, const char *user, const char *buf) { if (!buf) { return; @@ -1222,7 +1222,7 @@ void ptlink_cmd_kick(char *source, char *chan, char *user, char *buf) } /* QUIT */ -void ptlink_cmd_quit(char *source, char *buf) +void ptlink_cmd_quit(const char *source, const char *buf) { if (buf) { send_cmd(source, "QUIT :%s", buf); @@ -1231,7 +1231,7 @@ void ptlink_cmd_quit(char *source, char *buf) } } -void ptlink_cmd_part(char *nick, char *chan, char *buf) +void ptlink_cmd_part(const char *nick, const char *chan, const char *buf) { if (buf) { send_cmd(nick, "PART %s :%s", chan, buf); @@ -1248,8 +1248,8 @@ void ptlink_cmd_part(char *nick, char *chan, char *buf) parv[3] = topic time parv[4] = topic text */ -void ptlink_cmd_topic(char *whosets, char *chan, char *whosetit, - char *topic, time_t when) +void ptlink_cmd_topic(const char *whosets, const char *chan, const char *whosetit, + const char *topic, time_t when) { send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit, (long int) time(NULL), topic); @@ -1260,7 +1260,7 @@ void ptlink_cmd_vhost_off(User * u) /* does not support vhosting */ } -void ptlink_cmd_vhost_on(char *nick, char *vIdent, char *vhost) +void ptlink_cmd_vhost_on(const char *nick, const char *vIdent, const char *vhost) { User *u; @@ -1275,7 +1275,7 @@ void ptlink_cmd_vhost_on(char *nick, char *vIdent, char *vhost) } /* INVITE */ -void ptlink_cmd_invite(char *source, char *chan, char *nick) +void ptlink_cmd_invite(const char *source, const char *chan, const char *nick) { if (!source || !chan || !nick) { return; @@ -1284,33 +1284,33 @@ void ptlink_cmd_invite(char *source, char *chan, char *nick) send_cmd(source, "INVITE %s %s", nick, chan); } -void ptlink_cmd_372(char *source, char *msg) +void ptlink_cmd_372(const char *source, const char *msg) { send_cmd(ServerName, "372 %s :- %s", source, msg); } -void ptlink_cmd_372_error(char *source) +void ptlink_cmd_372_error(const char *source) { send_cmd(ServerName, "422 %s :- MOTD file not found! Please " "contact your IRC administrator.", source); } -void ptlink_cmd_375(char *source) +void ptlink_cmd_375(const char *source) { send_cmd(ServerName, "375 %s :- %s Message of the Day", source, ServerName); } -void ptlink_cmd_376(char *source) +void ptlink_cmd_376(const char *source) { send_cmd(ServerName, "376 %s :End of /MOTD command.", source); } -void ptlink_set_umode(User * user, int ac, char **av) +void ptlink_set_umode(User * user, int ac, const char **av) { int add = 1; /* 1 if adding modes, 0 if deleting */ - char *modes = av[0]; + const char *modes = av[0]; ac--; @@ -1362,7 +1362,7 @@ void ptlink_set_umode(User * user, int ac, char **av) } } -int anope_event_ping(char *source, int ac, char **av) +int anope_event_ping(const char *source, int ac, const char **av) { if (ac < 1) return MOD_CONT; @@ -1370,7 +1370,7 @@ int anope_event_ping(char *source, int ac, char **av) return MOD_CONT; } -int anope_event_away(char *source, int ac, char **av) +int anope_event_away(const char *source, int ac, const char **av) { if (!source) { return MOD_CONT; @@ -1379,7 +1379,7 @@ int anope_event_away(char *source, int ac, char **av) return MOD_CONT; } -void ptlink_cmd_bot_nick(char *nick, char *user, char *host, char *real, +void ptlink_cmd_bot_nick(const char *nick, const char *user, const char *host, const char *real, char *modes) { EnforceQlinedNick(nick, s_BotServ); @@ -1390,7 +1390,7 @@ void ptlink_cmd_bot_nick(char *nick, char *user, char *host, char *real, } -void ptlink_cmd_351(char *source) +void ptlink_cmd_351(const char *source) { send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s", source, version_number, ServerName, ircd->name, version_flags, @@ -1400,13 +1400,13 @@ void ptlink_cmd_351(char *source) } /* SVSHOLD - set */ -void ptlink_cmd_svshold(char *nick) +void ptlink_cmd_svshold(const char *nick) { /* Not supported by this IRCD */ } /* SVSHOLD - release */ -void ptlink_cmd_release_svshold(char *nick) +void ptlink_cmd_release_svshold(const char *nick) { /* Not Supported by this IRCD */ } @@ -1416,7 +1416,7 @@ void ptlink_cmd_release_svshold(char *nick) parv[0] = sender parv[1] = zlined host */ -void ptlink_cmd_unszline(char *mask) +void ptlink_cmd_unszline(const char *mask) { send_cmd(s_OperServ, "UNZLINE %s", mask); } @@ -1428,7 +1428,7 @@ void ptlink_cmd_unszline(char *mask) parv[2] = time parv[3] = reason */ -void ptlink_cmd_szline(char *mask, char *reason, char *whom) +void ptlink_cmd_szline(const char *mask, const char *reason, const char *whom) { send_cmd(s_OperServ, "ZLINE %s %ld :%s", mask, (long int) time(NULL) + 86400 * 2, reason); @@ -1439,7 +1439,7 @@ void ptlink_cmd_szline(char *mask, char *reason, char *whom) parv[0] = sender parv[1] = info ban mask */ -void ptlink_cmd_unsgline(char *mask) +void ptlink_cmd_unsgline(const char *mask) { send_cmd(ServerName, "UNSXLINE :%s", mask); } @@ -1452,7 +1452,7 @@ void ptlink_cmd_unsgline(char *mask) * parv[1] = mask length * parv[2] = real name banned mask:reason */ -void ptlink_cmd_sgline(char *mask, char *reason) +void ptlink_cmd_sgline(const char *mask, const char *reason) { send_cmd(ServerName, "SXLINE %d :%s:%s", (int) strlen(mask), mask, reason); @@ -1466,7 +1466,7 @@ void ptlink_cmd_sgline(char *mask, char *reason) parv[2] = new nick e.g.: :NickServ SVSNICK Smiler 67455223 _Smiler- */ -void ptlink_cmd_svsnick(char *source, char *guest, time_t when) +void ptlink_cmd_svsnick(const char *source, const char *guest, time_t when) { if (!source || !guest) { return; @@ -1474,8 +1474,8 @@ void ptlink_cmd_svsnick(char *source, char *guest, time_t when) send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when); } -void ptlink_cmd_guest_nick(char *nick, char *user, char *host, char *real, - char *modes) +void ptlink_cmd_guest_nick(const char *nick, const char *user, const char *host, const char *real, + const char *modes) { send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick, (unsigned long int) time(NULL), modes, user, host, host, @@ -1483,19 +1483,19 @@ void ptlink_cmd_guest_nick(char *nick, char *user, char *host, char *real, } -void ptlink_cmd_unban(char *name, char *nick) +void ptlink_cmd_unban(const char *name, const char *nick) { /* Not Supported by this IRCD */ } /* SVSMODE channel modes */ -void ptlink_cmd_svsmode_chan(char *name, char *mode, char *nick) +void ptlink_cmd_svsmode_chan(const char *name, const char *mode, const char *nick) { /* Not Supported by this IRCD */ } -void ptlink_cmd_svso(char *source, char *nick, char *flag) +void ptlink_cmd_svso(const char *source, const char *nick, const char *flag) { /* Not Supported by this IRCD */ } @@ -1503,7 +1503,7 @@ void ptlink_cmd_svso(char *source, char *nick, char *flag) /* SVSMODE +d */ /* sent if svid is something weird */ -void ptlink_cmd_svid_umode(char *nick, time_t ts) +void ptlink_cmd_svid_umode(const char *nick, time_t ts) { /* Not Supported by this ircd */ } @@ -1517,12 +1517,12 @@ void ptlink_cmd_nc_change(User * u) /* SVSMODE +d */ /* sent if svid is something weird */ -void ptlink_cmd_svid_umode2(User * u, char *ts) +void ptlink_cmd_svid_umode2(User * u, const char *ts) { common_svsmode(u, "+r", NULL); } -void ptlink_cmd_svid_umode3(User * u, char *ts) +void ptlink_cmd_svid_umode3(User * u, const char *ts) { /* Bahamuts have this extra one, since they can check on even nick changes */ } @@ -1534,7 +1534,7 @@ void ptlink_cmd_svid_umode3(User * u, char *ts) parv[1] = new nick parv[2] = TS (timestamp from user's server when nick changed was received) */ -void ptlink_cmd_chg_nick(char *oldnick, char *newnick) +void ptlink_cmd_chg_nick(const char *oldnick, const char *newnick) { if (!oldnick || !newnick) { return; @@ -1550,7 +1550,7 @@ void ptlink_cmd_chg_nick(char *oldnick, char *newnick) parv[2] = channels list :OperServ SVSJOIN Trystan #Admin */ -void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param) +void ptlink_cmd_svsjoin(const char *source, const char *nick, const char *chan, const char *param) { send_cmd(source, "SVSJOIN %s %s", nick, chan); } @@ -1562,47 +1562,47 @@ void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param) parv[2] = channels list e.g.: :ChanServ SVSPART mynick 4163321 #Chan1,#Chan2 */ -void ptlink_cmd_svspart(char *source, char *nick, char *chan) +void ptlink_cmd_svspart(const char *source, const char *nick, const char *chan) { send_cmd(source, "SVSPART %s :%s", nick, chan); } -void ptlink_cmd_swhois(char *source, char *who, char *mask) +void ptlink_cmd_swhois(const char *source, const char *who, const char *mask) { /* not supported */ } -int anope_event_notice(char *source, int ac, char **av) +int anope_event_notice(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_pass(char *source, int ac, char **av) +int anope_event_pass(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_rehash(char *source, int ac, char **av) +int anope_event_rehash(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_credits(char *source, int ac, char **av) +int anope_event_credits(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_admin(char *source, int ac, char **av) +int anope_event_admin(const char *source, int ac, const char **av) { return MOD_CONT; } -int anope_event_invite(char *source, int ac, char **av) +int anope_event_invite(const char *source, int ac, const char **av) { return MOD_CONT; } -int ptlink_flood_mode_check(char *value) +int ptlink_flood_mode_check(const char *value) { char *dp, *end; @@ -1621,7 +1621,7 @@ void ptlink_cmd_eob() /* not supported */ } -void ptlink_cmd_jupe(char *jserver, char *who, char *reason) +void ptlink_cmd_jupe(const char *jserver, const char *who, const char *reason) { char rbuf[256]; @@ -1635,7 +1635,7 @@ void ptlink_cmd_jupe(char *jserver, char *who, char *reason) } /* GLOBOPS - to handle old WALLOPS */ -void ptlink_cmd_global_legacy(char *source, char *fmt) +void ptlink_cmd_global_legacy(const char *source, const char *fmt) { send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt); } @@ -1644,7 +1644,7 @@ void ptlink_cmd_global_legacy(char *source, char *fmt) 1 = valid nick 0 = nick is in valid */ -int ptlink_valid_nick(char *nick) +int ptlink_valid_nick(const char *nick) { /* no hard coded invalid nicks */ return 1; @@ -1654,14 +1654,14 @@ int ptlink_valid_nick(char *nick) 1 = valid chan 0 = chan is in valid */ -int ptlink_valid_chan(char *cahn) +int ptlink_valid_chan(const char *cahn) { /* no hard coded invalid chan */ return 1; } -void ptlink_cmd_ctcp(char *source, char *dest, char *buf) +void ptlink_cmd_ctcp(const char *source, const char *dest, const char *buf) { char *s; |
