diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:45:32 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:45:32 +0000 |
commit | ff3eef491aa9e107d09d9dd9560ef7715b37b3b3 (patch) | |
tree | 76532ed5d9dd8ec0deb86793bc72d548e7a4c76a /src/commands/cmd_invite.cpp | |
parent | 123eac3f25ce4dd3142b4ac66eb321f7df1e23e4 (diff) |
Move all local-only fields to LocalUser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11944 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_invite.cpp')
-rw-r--r-- | src/commands/cmd_invite.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp index 9da6096a4..84c522754 100644 --- a/src/commands/cmd_invite.cpp +++ b/src/commands/cmd_invite.cpp @@ -90,7 +90,8 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use } } - u->InviteTo(c->name.c_str(), timeout); + if (IS_LOCAL(u)) + IS_LOCAL(u)->InviteTo(c->name.c_str(), timeout); u->WriteFrom(user,"INVITE %s :%s",u->nick.c_str(),c->name.c_str()); user->WriteNumeric(RPL_INVITING, "%s %s %s",user->nick.c_str(),u->nick.c_str(),c->name.c_str()); switch (ServerInstance->Config->AnnounceInvites) @@ -113,11 +114,11 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use } FOREACH_MOD(I_OnUserInvite,OnUserInvite(user,u,c,timeout)); } - else + else if (IS_LOCAL(user)) { // pinched from ircu - invite with not enough parameters shows channels // youve been invited to but haven't joined yet. - InvitedList* il = user->GetInviteList(); + InvitedList* il = IS_LOCAL(user)->GetInviteList(); for (InvitedList::iterator i = il->begin(); i != il->end(); i++) { user->WriteNumeric(RPL_INVITELIST, "%s :%s",user->nick.c_str(),i->first.c_str()); |