summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 23:16:18 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-08 23:16:18 +0000
commitaaf5226111f515f4baa68e95ea6a1db740828ac3 (patch)
treeab8b622f04ebf09448ee0f2e02f32496812db003 /src/modules
parentec97c162f84a3979a0f6a1c3443366784062ac9e (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/modules')
-rw-r--r--src/modules/m_operwho.cpp2
-rw-r--r--src/modules/m_safelist.cpp5
-rw-r--r--src/modules/m_uninvite.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_operwho.cpp b/src/modules/m_operwho.cpp
index e4dbf3235..8926b2a9c 100644
--- a/src/modules/m_operwho.cpp
+++ b/src/modules/m_operwho.cpp
@@ -128,7 +128,7 @@ class ModuleOperWho : public Module
{
for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
{
- if ((has_channel(i->second,Ptr)) && (isnick(i->second->nick)))
+ if ((Ptr->HasUser(i->second)) && (isnick(i->second->nick)))
{
// Fix Bug #29 - Part 2..
*tmp = 0;
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index debacaaeb..6e1789097 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -97,10 +97,11 @@ class ListTimer : public InspTimer
WriteServ(u->fd,"321 %s Channel :Users Name",u->nick);
chan = Srv->GetChannelIndex(ld->list_position);
/* spool details */
- if ((chan) && (((!(chan->binarymodes & CM_PRIVATE)) && (!(chan->binarymodes & CM_SECRET))) || (has_channel(u,chan))))
+ bool has_user = chan->HasUser(u);
+ if ((chan) && (((!(chan->binarymodes & CM_PRIVATE)) && (!(chan->binarymodes & CM_SECRET))) || (has_user)))
{
/* Increment total plus linefeed */
- int counter = snprintf(buffer,MAXBUF,"322 %s %s %d :[+%s] %s",u->nick,chan->name,usercount_i(chan),chanmodes(chan,has_channel(u,chan)),chan->topic);
+ int counter = snprintf(buffer,MAXBUF,"322 %s %s %d :[+%s] %s",u->nick,chan->name,usercount_i(chan),chanmodes(chan,has_user),chan->topic);
amount_sent += counter + 4 + Srv->GetServerName().length();
log(DEBUG,"m_safelist.so: Sent %ld of safe %ld / 4",amount_sent,u->sendqmax);
WriteServ_NoFormat(u->fd,buffer);
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index e9c2078cb..dbd3af52f 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -70,7 +70,7 @@ class cmd_uninvite : public command_t
WriteServ(user->fd,"491 %s %s %s :Is not invited to channel %s",user->nick,u->nick,c->name,c->name);
return;
}
- if (!has_channel(user,c))
+ if (!c->HasUser(user))
{
WriteServ(user->fd,"492 %s %s :You're not on that channel!",user->nick, c->name);
return;