diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-08 11:26:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-08 11:26:31 +0000 |
commit | feeeced47094ed52541d1bc74440f1b223e6dadc (patch) | |
tree | ff4c25a84b2faed5cf45cac5eea35002cd1e190a /src | |
parent | 53d548355b6657e01bd6a296dc87c4abec271fef (diff) |
option to allow announce of invites to channel (similar to unreal)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6635 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_invite.cpp | 5 | ||||
-rw-r--r-- | src/configreader.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd_invite.cpp b/src/cmd_invite.cpp index 88b64f03d..2910aca3f 100644 --- a/src/cmd_invite.cpp +++ b/src/cmd_invite.cpp @@ -74,10 +74,11 @@ CmdResult cmd_invite::Handle (const char** parameters, int pcnt, userrec *user) return CMD_FAILURE; } - irc::string xname(c->name); - u->InviteTo(xname); + u->InviteTo(c->name); u->WriteFrom(user,"INVITE %s :%s",u->nick,c->name); user->WriteServ("341 %s %s %s",user->nick,u->nick,c->name); + if (ServerInstance->Config->AnnounceInvites) + c->WriteChannelWithServ(ServerInstance->Config->ServerName, "%s invited %s into the channel", user->nick, u->nick) FOREACH_MOD(I_OnUserInvite,OnUserInvite(user,u,c)); } else diff --git a/src/configreader.cpp b/src/configreader.cpp index 9d920dc8c..1d4908f7a 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -590,6 +590,7 @@ void ServerConfig::Read(bool bail, userrec* user) {"options", "syntaxhints", "0", new ValueContainerBool (&this->SyntaxHints), DT_BOOLEAN, NoValidation}, {"options", "cyclehosts", "0", new ValueContainerBool (&this->CycleHosts), DT_BOOLEAN, NoValidation}, {"options", "ircumsgprefix","0", new ValueContainerBool (&this->UndernetMsgPrefix), DT_BOOLEAN, NoValidation}, + {"options", "announceinvites", "1", new ValueContainerBool (&this->AnnounceInvites), DT_BOOLEAN, NoValidation}, {"options", "hostintopic", "1", new ValueContainerBool (&this->FullHostInTopic), DT_BOOLEAN, NoValidation}, {"pid", "file", "", new ValueContainerChar (this->PID), DT_CHARPTR, NoValidation}, {"whowas", "groupsize", "10", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation}, |