diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-17 02:10:35 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-17 02:10:35 +0000 |
| commit | 861fe9e7b32c8e1e523cc774547e460c9ed67289 (patch) | |
| tree | b821f00ef784751ff7c43771175b818fec4645bb /src/protocol/bahamut.c | |
| parent | 453963eeaeb4232df3e331522408034606cfefd6 (diff) | |
Added BotInfo* sender arg to all of the User mode functions, changed IRcdProto::SendMode for channels to accept a Channel pointer and fixed unsetting users vhosts on Unreal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2710 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/bahamut.c')
| -rw-r--r-- | src/protocol/bahamut.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index 288b36329..6ec072b87 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -141,17 +141,17 @@ void bahamut_cmd_chghost(const char *nick, const char *vhost) class BahamutIRCdProto : public IRCDProto { - void SendModeInternal(BotInfo *source, const char *dest, const char *buf) + void SendModeInternal(BotInfo *source, Channel *dest, const char *buf) { if (!buf) return; - if (ircdcap->tsmode && (uplink_capab & ircdcap->tsmode)) send_cmd(source->nick, "MODE %s 0 %s", dest, buf); - else send_cmd(source->nick, "MODE %s %s", dest, buf); + if (ircdcap->tsmode && (uplink_capab & ircdcap->tsmode)) send_cmd(source->nick, "MODE %s 0 %s", dest->name, buf); + else send_cmd(source->nick, "MODE %s %s", dest->name, buf); } - void SendModeInternal(User *u, const char *buf) + void SendModeInternal(BotInfo *bi, User *u, const char *buf) { if (!buf) return; - send_cmd(Config.ServerName, "SVSMODE %s %ld %s", u->nick, static_cast<long>(u->timestamp), buf); + send_cmd(bi ? bi->nick : Config.ServerName, "SVSMODE %s %ld %s", u->nick, static_cast<long>(u->timestamp), buf); } /* SVSHOLD - set */ @@ -271,7 +271,7 @@ class BahamutIRCdProto : public IRCDProto */ void SendSVSMode(User *u, int ac, const char **av) { - this->SendModeInternal(u, merge_args(ac, av)); + this->SendModeInternal(NULL, u, merge_args(ac, av)); } void SendEOB() @@ -302,8 +302,9 @@ class BahamutIRCdProto : public IRCDProto /* nc_change was = 1, and there is no na->status */ void SendUnregisteredNick(User *u) { - u->RemoveMode(UMODE_REGISTERED); - ircdproto->SendMode(u, "+d 1"); + BotInfo *bi = findbot(Config.s_NickServ); + u->RemoveMode(bi, UMODE_REGISTERED); + ircdproto->SendMode(bi, u, "+d 1"); } /* SERVER */ @@ -340,8 +341,9 @@ class BahamutIRCdProto : public IRCDProto u->nc->Extend("authenticationtoken", sstrdup(svidbuf)); - u->SetMode(UMODE_REGISTERED); - ircdproto->SendMode(u, "+d %s", svidbuf); + BotInfo *bi = findbot(Config.s_NickServ); + u->SetMode(bi, UMODE_REGISTERED); + ircdproto->SendMode(bi, u, "+d %s", svidbuf); } } ircd_proto; |
