diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-08 18:59:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-08 18:59:55 +0000 |
commit | 21cf60233cdee26118774a86ea612d1c5671ba7a (patch) | |
tree | 36313b7bbdc3adbb561c6f508fbf9fe716a17f48 /src/modules/m_spanningtree.cpp | |
parent | b2f5fc1e32971532c9f302884007e645ea3c38ce (diff) |
Got rid of all that ugly char* cast crap (todo: change docs to reflect change)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3556 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index a42063cfe..54fc0fd77 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1143,24 +1143,22 @@ class TreeSocket : public InspSocket size_t counter = snprintf(list,MAXBUF,":%s FJOIN %s %lu",Srv->GetServerName().c_str(),c->name,(unsigned long)c->age); size_t initial = counter; - std::map<char*,char*> *ulist = c->GetUsers(); + CUList *ulist = c->GetUsers(); std::vector<userrec*> specific_halfop; std::vector<userrec*> specific_voice; - for (std::map<char*,char*>::iterator i = ulist->begin(); i != ulist->end(); i++) + for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - char* o = i->second; - userrec* otheruser = (userrec*)o; charlcat(list,' ',MAXBUF); counter++; - int x = cflags(otheruser,c); + int x = cflags(i->second,c); if ((x & UCMODE_HOP) && (x & UCMODE_OP)) { - specific_halfop.push_back(otheruser); + specific_halfop.push_back(i->second); } if (((x & UCMODE_HOP) || (x & UCMODE_OP)) && (x & UCMODE_VOICE)) { - specific_voice.push_back(otheruser); + specific_voice.push_back(i->second); } char n = 0; @@ -1183,7 +1181,7 @@ class TreeSocket : public InspSocket counter++; } - counter += strlcat(list,otheruser->nick,MAXBUF); + counter += strlcat(list,i->second->nick,MAXBUF); if (counter > (480-NICKMAX)) { @@ -2660,14 +2658,12 @@ void AddThisServer(TreeServer* server, std::deque<TreeServer*> &list) // returns a list of DIRECT servernames for a specific channel void GetListOfServersForChannel(chanrec* c, std::deque<TreeServer*> &list) { - std::map<char*,char*> *ulist = c->GetUsers(); - for (std::map<char*,char*>::iterator i = ulist->begin(); i != ulist->end(); i++) + CUList *ulist = c->GetUsers(); + for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { - char* o = i->second; - userrec* otheruser = (userrec*)o; - if (otheruser->fd < 0) + if (i->second->fd < 0) { - TreeServer* best = BestRouteTo(otheruser->server); + TreeServer* best = BestRouteTo(i->second->server); if (best) AddThisServer(best,list); } |