/[svn]/ircd-hybrid-7.2/contrib/m_clearchan.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/contrib/m_clearchan.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 615 by michael, Sun Apr 30 16:57:48 2006 UTC revision 616 by michael, Mon May 22 07:10:56 2006 UTC
# Line 151  mo_clearchan(struct Client *client_p, st Line 151  mo_clearchan(struct Client *client_p, st
151  static void  static void
152  kick_list(struct Client *source_p, struct Channel *chptr)  kick_list(struct Client *source_p, struct Channel *chptr)
153  {  {
154    dlink_node *m = NULL, *next_m = NULL;    dlink_node *ptr = NULL, *ptr_next = NULL;
155      struct Membership *ms = NULL;
156    
157    add_user_to_channel(chptr, source_p, CHFL_CHANOP, NO);    DLINK_FOREACH(ptr, chptr->members.head)
   
   DLINK_FOREACH_SAFE(m, next_m, chptr->members.head)  
158    {    {
159      struct Membership *ms = m->data;      ms = ptr->data;
   
     if (ms->client_p == source_p)  
       continue;  
   
     /* can reuse m here */  
     DLINK_FOREACH(m, chptr->members.head)  
     {  
       if (!MyConnect(source_p) ||  
           ((struct Membership *)m->data)->client_p == source_p)  
         continue;  
       sendto_one(m->data, ":%s!%s@%s KICK %s %s :CLEARCHAN",  
                  source_p->name, source_p->username,  
                  source_p->host,  
                  chptr->chname, ms->client_p->name);  
     }  
160    
161        sendto_channel_local(ALL_MEMBERS, NO, chptr,
162                             ":%s!%s@%s KICK %s %s CLEARCHAN",
163                             source_p->name, source_p->username,
164                             source_p->host, chptr->chname, ms->client_p->name);
165      sendto_server(NULL, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,      sendto_server(NULL, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
166                    ":%s KICK %s %s :CLEARCHAN", source_p->name,                    ":%s KICK %s %s :CLEARCHAN", source_p->name,
167                    chptr->chname, ms->client_p->name);                    chptr->chname, ms->client_p->name);
168      remove_user_from_channel(ms);    }
169    
170      add_user_to_channel(chptr, source_p, CHFL_CHANOP, NO);
171    
172      DLINK_FOREACH_SAFE(ptr, ptr_next, chptr->members.head)
173      {
174        ms = ptr->data;
175    
176        if (ms->client_p != source_p)
177          remove_user_from_channel(ms);
178    }    }
179    
180    /*    /*

Legend:
Removed from v.615  
changed lines
  Added in v.616

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28