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

Diff of /ircd-hybrid/contrib/m_killhost.c

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

revision 620 by adx, Sat Feb 11 23:37:10 2006 UTC revision 621 by michael, Wed May 24 19:05:08 2006 UTC
# Line 72  mo_killhost(struct Client *client_p, str Line 72  mo_killhost(struct Client *client_p, str
72              int parc, char *parv[])              int parc, char *parv[])
73  {  {
74    dlink_node *ptr = NULL, *ptr_next = NULL;    dlink_node *ptr = NULL, *ptr_next = NULL;
   struct Client *target_p = NULL;  
75    const char *inpath = client_p->name;    const char *inpath = client_p->name;
   char *nick = NULL;  
   char *user = NULL;  
   char *host = NULL;  
76    char *reason = NULL;    char *reason = NULL;
77    char bufhost[IRCD_BUFSIZE];    char bufhost[IRCD_BUFSIZE];
78    char conf_nick[NICKLEN + 1];    char nick[NICKLEN + 1];
79    char conf_user[USERLEN + 1];    char user[USERLEN + 1];
80    char conf_host[HOSTLEN + 1];    char host[HOSTLEN + 1];
81    char def_reason[] = "No reason";    char def_reason[] = "No reason";
82    unsigned int count = 0;    unsigned int count = 0;
83    struct split_nuh_item nuh;    struct split_nuh_item nuh;
# Line 94  mo_killhost(struct Client *client_p, str Line 90  mo_killhost(struct Client *client_p, str
90    }    }
91    
92    nuh.nuhmask  = parv[1];    nuh.nuhmask  = parv[1];
93    nuh.nickptr  = conf_nick;    nuh.nickptr  = nick;
94    nuh.userptr  = conf_user;    nuh.userptr  = user;
95    nuh.hostptr  = conf_host;    nuh.hostptr  = host;
96    
97    nuh.nicksize = sizeof(conf_nick);    nuh.nicksize = sizeof(nick);
98    nuh.usersize = sizeof(conf_user);    nuh.usersize = sizeof(user);
99    nuh.hostsize = sizeof(conf_host);    nuh.hostsize = sizeof(host);
100    
101    split_nuh(&nuh);    split_nuh(&nuh);
102    
# Line 118  mo_killhost(struct Client *client_p, str Line 114  mo_killhost(struct Client *client_p, str
114    
115    DLINK_FOREACH_SAFE(ptr, ptr_next, global_client_list.head)    DLINK_FOREACH_SAFE(ptr, ptr_next, global_client_list.head)
116    {    {
117      target_p = ptr->data;      struct Client *target_p = ptr->data;
118    
119      if (!IsClient(target_p) || (source_p == target_p))      if (!IsClient(target_p) || (source_p == target_p))
120        continue;        continue;
121    
122      if (!MyConnect(target_p) && !IsOperGlobalKill(source_p))      if (!MyConnect(target_p) && !IsOperGlobalKill(source_p))
123        continue;        continue;
124          
125      if (match(nick, target_p->name) &&      if (match(nick, target_p->name) &&
126          match(user, target_p->username) &&          match(user, target_p->username) &&
127          match(host, target_p->host))          match(host, target_p->host))
# Line 139  mo_killhost(struct Client *client_p, str Line 135  mo_killhost(struct Client *client_p, str
135                             "Received KILL message for %s. From %s Path: %s (%s)",                             "Received KILL message for %s. From %s Path: %s (%s)",
136                             target_p->name, source_p->name, me.name, reason);                             target_p->name, source_p->name, me.name, reason);
137    
138        ilog(L_INFO,"KILL From %s For %s Path %s (%s)",        ilog(L_INFO, "KILL From %s For %s Path %s (%s)",
139             source_p->name, target_p->name, me.name, reason);             source_p->name, target_p->name, me.name, reason);
140    
141        if (!MyConnect(target_p))        if (!MyConnect(target_p))

Legend:
Removed from v.620  
changed lines
  Added in v.621

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