X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhelperfuncs.cpp;h=77a74c32c111d6b2ceea501d2f2d15fff28b8158;hb=9dd72b7003963d868a23da930a91300b49ab4959;hp=a30a669ae25a8d38dd506860e713e35be6ba663a;hpb=3cf1ae04704b4f1706daa1077b90fd14d1e72cef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index a30a669ae..77a74c32c 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -547,7 +547,7 @@ void WriteChannelLocal_NoFormat(chanrec* Ptr, userrec* user, const char* text) -void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...) +void WriteChannelWithServ(const char* ServName, chanrec* Ptr, const char* text, ...) { char textbuffer[MAXBUF]; va_list argsPtr; @@ -572,7 +572,7 @@ void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...) } } -void WriteChannelWithServ_NoFormat(char* ServName, chanrec* Ptr, const char* text) +void WriteChannelWithServ_NoFormat(const char* ServName, chanrec* Ptr, const char* text) { CUList *ulist; @@ -966,7 +966,7 @@ void WriteOpers_NoFormat(const char* text) if (IS_LOCAL(a)) { - if (a->modebits & UM_SERVERNOTICE) + if (a->modes[UM_SERVERNOTICE]) { // send server notices to all with +s WriteServ(a->fd,"NOTICE %s :%s",a->nick,text); @@ -1045,7 +1045,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...) for (int n = 0; n < modelen; n++) { - if (!hasumode(t,modes[n])) + if (!t->modes[modes[n]-65]) { send_to_user = false; break; @@ -1058,7 +1058,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...) for (int n = 0; n < modelen; n++) { - if (hasumode(t,modes[n])) + if (t->modes[modes[n]-65]) { send_to_user = true; break; @@ -1121,7 +1121,7 @@ void WriteWallOps(userrec *source, bool local_only, char* text, ...) { userrec* t = (userrec*)(*i); - if ((IS_LOCAL(t)) && (t->modebits & UM_WALLOPS)) + if ((IS_LOCAL(t)) && (t->modes[UM_WALLOPS])) { WriteTo_NoFormat(source,t,formatbuffer); } @@ -1334,7 +1334,7 @@ void userlist(userrec *user,chanrec *c) for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - if ((!has_user) && (i->second->modebits & UM_INVISIBLE)) + if ((!has_user) && (i->second->modes[UM_INVISIBLE])) { /* * user is +i, and source not on the channel, does not show @@ -1385,7 +1385,7 @@ int usercount_i(chanrec *c) CUList *ulist= c->GetUsers(); for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - if (!(i->second->modebits & UM_INVISIBLE)) + if (!(i->second->modes[UM_INVISIBLE])) count++; } @@ -1499,7 +1499,7 @@ int usercount_invisible(void) for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if ((i->second->registered == 7) && (i->second->modebits & UM_INVISIBLE)) + if ((i->second->registered == 7) && (i->second->modes[UM_INVISIBLE])) c++; }