diff options
author | Adam <Adam@anope.org> | 2011-10-14 12:20:07 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-10-14 12:20:07 -0400 |
commit | ddc3c2f38cf6ddc0c1f8ad82489a281e01ef50fc (patch) | |
tree | 832b02a62d2da9078b7ab5f9d4d5d99e15570294 /modules/protocol/bahamut.cpp | |
parent | 53275c362c521807b70e1eb7cf936f35593dd4dc (diff) |
Added options:nonicknameownership config option
Diffstat (limited to 'modules/protocol/bahamut.cpp')
-rw-r--r-- | modules/protocol/bahamut.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 2ae061009..7b9f1495c 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -218,13 +218,6 @@ class BahamutIRCdProto : public IRCDProto send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", u->nick.c_str(), static_cast<long>(u->timestamp), modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->server->GetName().c_str(), u->realname.c_str()); } - /* SVSMODE +d */ - /* nc_change was = 1, and there is no na->status */ - void SendUnregisteredNick(const User *u) - { - ircdproto->SendMode(findbot(Config->NickServ), u, "+d 1"); - } - /* SERVER */ void SendServer(const Server *server) { @@ -240,14 +233,6 @@ class BahamutIRCdProto : public IRCDProto bahamut_cmd_burst(); } - void SetAutoIdentificationToken(User *u) - { - if (!u->Account()) - return; - - ircdproto->SendMode(findbot(Config->NickServ), u, "+d %d", u->timestamp); - } - void SendChannel(Channel *c) { Anope::string modes = c->GetModes(true, true); @@ -255,6 +240,18 @@ class BahamutIRCdProto : public IRCDProto modes = "+"; send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str()); } + + void SendLogin(User *u) + { + BotInfo *ns = findbot(Config->NickServ); + ircdproto->SendMode(ns, u, "+d %d", u->timestamp); + } + + void SendLogout(User *u) + { + BotInfo *ns = findbot(Config->NickServ); + ircdproto->SendMode(ns, u, "+d 1"); + } }; class BahamutIRCdMessage : public IRCdMessage @@ -303,7 +300,7 @@ class BahamutIRCdMessage : public IRCdMessage if (user->timestamp == convertTo<time_t>(params[7]) && (na = findnick(user->nick))) { user->Login(na->nc); - if (na->nc->HasFlag(NI_UNCONFIRMED) == false) + if (!Config->NoNicknameOwnership && na->nc->HasFlag(NI_UNCONFIRMED) == false) user->SetMode(findbot(Config->NickServ), UMODE_REGISTERED); } else |