diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-13 16:11:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-13 16:11:08 +0000 |
commit | 8c00f38e5b8efc96504b36ddbdadc12e007a9a13 (patch) | |
tree | 47a06b96403cfb06b65fcbcd6961f3684ea6c835 /src/message.cpp | |
parent | 1ed779491fd46606b4ee3e258abe0d81e8207422 (diff) |
Made MAXCHANS growable for opers/ulines (growing of list not implemented yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2367 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/message.cpp')
-rw-r--r-- | src/message.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/message.cpp b/src/message.cpp index 2f527c983..bb49d48ca 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -68,9 +68,9 @@ int common_channels(userrec *u, userrec *u2) log(DEFAULT,"*** BUG *** common_channels was given an invalid parameter"); return 0; } - for (int i = 0; i != MAXCHANS; i++) + for (int i = 0; i < u->chans.size(); i++) { - for (int z = 0; z != MAXCHANS; z++) + for (int z = 0; z != u2->chans.size(); z++) { if ((u->chans[i].channel != NULL) && (u2->chans[z].channel != NULL)) { @@ -193,7 +193,7 @@ int CleanAndResolve (char *resolvedHost, const char *unresolvedHost) int c_count(userrec* u) { int z = 0; - for (int i =0; i != MAXCHANS; i++) + for (int i =0; i < u->chans.size(); i++) if (u->chans[i].channel != NULL) z++; return z; @@ -311,7 +311,7 @@ char* cmode(userrec *user, chanrec *chan) return ""; } - for (int i = 0; i != MAXCHANS; i++) + for (int i = 0; i < user->chans.size(); i++) { if (user->chans[i].channel) { @@ -351,7 +351,7 @@ int cstatus(userrec *user, chanrec *chan) if (is_uline(user->server)) return STATUS_OP; - for (int i = 0; i != MAXCHANS; i++) + for (int i = 0; i < user->chans.size(); i++) { if (user->chans[i].channel) { @@ -385,7 +385,7 @@ int has_channel(userrec *u, chanrec *c) log(DEFAULT,"*** BUG *** has_channel was given an invalid parameter"); return 0; } - for (int i =0; i != MAXCHANS; i++) + for (int i =0; i < u->chans.size(); i++) { if (u->chans[i].channel) { @@ -436,7 +436,7 @@ char* chlist(userrec *user,userrec* source) { return lst; } - for (int i = 0; i != MAXCHANS; i++) + for (int i = 0; i < user->chans.size(); i++) { if (user->chans[i].channel != NULL) { |