diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-27 15:21:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-27 15:21:18 +0000 |
commit | e167849d49f30b080169811893b7d693ee97c22d (patch) | |
tree | 52703b0a8b92cf7a5d4847e7aa6cfee3f96ce3e3 | |
parent | b10ac3beb62b0b705797061f87d66ced6fc2e8d0 (diff) |
No suck nickname?! why didn't anyone see this?!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1215 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/commands.cpp | 24 | ||||
-rw-r--r-- | src/inspircd.cpp | 4 | ||||
-rw-r--r-- | src/mode.cpp | 30 | ||||
-rw-r--r-- | src/modules.cpp | 5 |
4 files changed, 34 insertions, 29 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 8d1436f7a..f7361640c 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -233,7 +233,7 @@ void handle_kick(char **parameters, int pcnt, userrec *user) if ((!u) || (!Ptr)) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); return; } @@ -405,7 +405,7 @@ void handle_kill(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -519,7 +519,7 @@ void handle_topic(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } return; @@ -569,7 +569,7 @@ void handle_topic(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } } @@ -600,7 +600,7 @@ void handle_names(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -648,7 +648,7 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user) else { /* no such nick/channel */ - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } return; } @@ -688,7 +688,7 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user) else { /* no such nick/channel */ - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -736,7 +736,7 @@ void handle_notice(char **parameters, int pcnt, userrec *user) else { /* no such nick/channel */ - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } return; } @@ -768,7 +768,7 @@ void handle_notice(char **parameters, int pcnt, userrec *user) else { /* no such nick/channel */ - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -870,13 +870,13 @@ void handle_whois(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } else { /* no such nick/channel */ - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -1012,7 +1012,7 @@ void handle_who(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } else diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c773ddc4d..47ed0c45a 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -728,9 +728,9 @@ void WriteChannelLocal(chanrec* Ptr, userrec* user, char* text, ...) } -void WriteChannelWithServ(char* ServName, chanrec* Ptr, userrec* user, char* text, ...) +void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...) { - if ((!Ptr) || (!user) || (!text)) + if ((!Ptr) || (!text)) { log(DEFAULT,"*** BUG *** WriteChannelWithServ was given an invalid parameter"); return; diff --git a/src/mode.cpp b/src/mode.cpp index 731de6457..1d94e3c40 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -94,14 +94,14 @@ char* give_ops(userrec *user,char *dest,chanrec *chan,int status) if (!isnick(dest)) { log(DEFAULT,"the target nickname given to give_ops was invalid"); - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } d = Find(dest); if (!d) { log(DEFAULT,"the target nickname given to give_ops couldnt be found"); - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -157,12 +157,12 @@ char* give_hops(userrec *user,char *dest,chanrec *chan,int status) d = Find(dest); if (!isnick(dest)) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } if (!d) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -213,12 +213,12 @@ char* give_voice(userrec *user,char *dest,chanrec *chan,int status) d = Find(dest); if (!isnick(dest)) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } if (!d) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -270,13 +270,13 @@ char* take_ops(userrec *user,char *dest,chanrec *chan,int status) if (!isnick(dest)) { log(DEBUG,"take_ops was given an invalid target nickname of %s",dest); - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } if (!d) { log(DEBUG,"take_ops couldnt resolve the target nickname: %s",dest); - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -328,12 +328,12 @@ char* take_hops(userrec *user,char *dest,chanrec *chan,int status) d = Find(dest); if (!isnick(dest)) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } if (!d) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -384,12 +384,12 @@ char* take_voice(userrec *user,char *dest,chanrec *chan,int status) d = Find(dest); if (!isnick(dest)) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } if (!d) { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, dest); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, dest); return NULL; } else @@ -1055,7 +1055,7 @@ void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int { if (!silent) { - WriteChannelWithServ(ServerName,chan,user,"MODE %s %s",chan->name,outstr); + WriteChannelWithServ(ServerName,chan,"MODE %s %s",chan->name,outstr); // M token for a usermode must go to all servers char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"M %s %s",chan->name, outstr); @@ -1449,7 +1449,7 @@ void handle_mode(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } @@ -1641,7 +1641,7 @@ void server_mode(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); + WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } diff --git a/src/modules.cpp b/src/modules.cpp index fd0f39503..af3ef5303 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -526,6 +526,11 @@ void Server::SendTo(userrec* Source, userrec* Dest, std::string s) } } +void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text) +{ + WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str()); +} + void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) { if (IncludeSender) |