]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Left figure from output
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 205121edd2b55639665e5bc2e0c26facc5576fd7..897f9f890e0b1144cdd075375629a0807a8bbd49 100644 (file)
@@ -416,7 +416,7 @@ void WriteCommon(userrec *u, char* text, ...)
 
         bool sent_to_at_least_one = false;
 
-        for (int i = 0; i < MAXCHANS; i++)
+        for (unsigned int i = 0; i < u->chans.size(); i++)
         {
                 if (u->chans[i].channel)
                 {
@@ -466,7 +466,7 @@ void WriteCommonExcept(userrec *u, char* text, ...)
 
         memset(&already_sent,0,65536);
 
-        for (int i = 0; i < MAXCHANS; i++)
+        for (unsigned int i = 0; i < u->chans.size(); i++)
         {
                 if (u->chans[i].channel)
                 {
@@ -607,7 +607,7 @@ bool CommonOnThisServer(userrec* u,const char* servername)
 {
         log(DEBUG,"ChanAnyOnThisServer");
 
-        for (int i = 0; i < MAXCHANS; i++)
+        for (unsigned int i = 0; i < u->chans.size(); i++)
         {
                 if (u->chans[i].channel)
                 {
@@ -803,7 +803,7 @@ void purge_empty_chans(userrec* u)
         int go_again = 1, purge = 0;
 
         // firstly decrement the count on each channel
-        for (int f = 0; f < MAXCHANS; f++)
+        for (unsigned int f = 0; f < u->chans.size(); f++)
         {
                 if (u->chans[f].channel)
                 {
@@ -811,7 +811,7 @@ void purge_empty_chans(userrec* u)
                 }
         }
 
-        for (int i = 0; i < MAXCHANS; i++)
+        for (unsigned int i = 0; i < u->chans.size(); i++)
         {
                 if (u->chans[i].channel)
                 {
@@ -1128,16 +1128,6 @@ long chancount(void)
         return chanlist.size();
 }
 
-long count_servs(void)
-{
-        return 0;
-}
-
-long servercount(void)
-{
-        return count_servs()+1;
-}
-
 long local_count()
 {
         int c = 0;
@@ -1200,21 +1190,6 @@ bool AllModulesReportReady(userrec* user)
         return true;
 }
 
-char islast(const char* s)
-{
-        return '+';
-}
-
-long map_count(const char* s)
-{
-        int c = 0;
-        for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
-        {
-                if ((i->second->fd) && (isnick(i->second->nick)) && (!strcasecmp(i->second->server,s))) c++;
-        }
-        return c;
-}
-
 void createcommand(char* cmd, handlerfunc f, char flags, int minparams,char* source)
 {
         command_t comm;