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

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

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

revision 592 by lusky, Sun Oct 2 21:05:51 2005 UTC revision 593 by michael, Fri May 12 05:47:32 2006 UTC
# Line 87  mo_killhost(struct Client *client_p, str Line 87  mo_killhost(struct Client *client_p, str
87    char *host = NULL;    char *host = NULL;
88    char *reason = NULL;    char *reason = NULL;
89    char bufhost[IRCD_BUFSIZE];    char bufhost[IRCD_BUFSIZE];
90    char buf_nuh[NICKLEN + USERLEN + HOSTLEN + 3];    char conf_nick[NICKLEN + 1];
91    char def_reason[] = "No reason specified";    char conf_user[USERLEN + 1];
92      char conf_host[HOSTLEN + 1];
93      char def_reason[] = "No reason";
94    unsigned int count = 0;    unsigned int count = 0;
95      struct split_nuh_item nuh;
96    
97    if (!(IsOperK(source_p) || IsOperGlobalKill(source_p)))    if (!(IsOperK(source_p) || IsOperGlobalKill(source_p)))
98    {    {
# Line 98  mo_killhost(struct Client *client_p, str Line 101  mo_killhost(struct Client *client_p, str
101      return;      return;
102    }    }
103    
104    strlcpy(buf_nuh, parv[1], sizeof(buf_nuh));    nuh.nuhmask  = parv[1];
105    split_nuh(buf_nuh, &nick, &user, &host);    nuh.nickptr  = conf_nick;
106      nuh.userptr  = conf_user;
107      nuh.hostptr  = conf_host;
108    
109      nuh.nicksize = sizeof(conf_nick);
110      nuh.usersize = sizeof(conf_user);
111      nuh.hostsize = sizeof(conf_host);
112    
113      split_nuh(&nuh);
114    
115    if (!valid_wild_card(source_p, YES, 3, nick, user, host))    if (!valid_wild_card(source_p, YES, 3, nick, user, host))
116      goto cleanup;      return;
117    
118    if (!EmptyString(parv[2]))    if (!EmptyString(parv[2]))
119    {    {
# Line 158  mo_killhost(struct Client *client_p, str Line 169  mo_killhost(struct Client *client_p, str
169    
170    sendto_one(source_p,":%s NOTICE %s :%u clients killed",    sendto_one(source_p,":%s NOTICE %s :%u clients killed",
171               me.name, source_p->name, count);               me.name, source_p->name, count);
 cleanup:  
   MyFree(nick);  
   MyFree(user);  
   MyFree(host);  
172  }  }
173    
174  static void  static void

Legend:
Removed from v.592  
changed lines
  Added in v.593

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