diff options
| author | 2006-03-08 23:16:18 +0000 | |
|---|---|---|
| committer | 2006-03-08 23:16:18 +0000 | |
| commit | aaf5226111f515f4baa68e95ea6a1db740828ac3 (patch) | |
| tree | ab8b622f04ebf09448ee0f2e02f32496812db003 /src/mode.cpp | |
| parent | Removed declarations of ancient and misspelled functions :/ (diff) | |
Removed has_channel(userrec*,chanrec*), the new preferred way of doing it is channel->HasUser(userrec)
Yeah its the other way around to the old way, but somehow, seems less backwards to me (its also faster)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3560 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 0acdd2bc0..5b5523dfe 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1310,7 +1310,7 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user) if (pcnt == 1) { /* just /modes #channel */ - WriteServ(user->fd,"324 %s %s +%s",user->nick, Ptr->name, chanmodes(Ptr,has_channel(user,Ptr))); + WriteServ(user->fd,"324 %s %s +%s",user->nick, Ptr->name, chanmodes(Ptr,Ptr->HasUser(user))); WriteServ(user->fd,"329 %s %s %d", user->nick, Ptr->name, Ptr->created); return; } @@ -1342,7 +1342,7 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user) } } - if (((Ptr) && (!has_channel(user,Ptr))) && (!is_uline(user->server)) && (IS_LOCAL(user))) + if ((IS_LOCAL(user)) && (!is_uline(user->server)) && (!Ptr->HasUser(user))) { WriteServ(user->fd,"442 %s %s :You're not on that channel!",user->nick, Ptr->name); return; @@ -1357,7 +1357,7 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user) return; if (MOD_RESULT == ACR_DEFAULT) { - if ((cstatus(user,Ptr) < STATUS_HOP) && (IS_LOCAL(user))) + if ((IS_LOCAL(user)) && (cstatus(user,Ptr) < STATUS_HOP)) { WriteServ(user->fd,"482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, Ptr->name); return; |
