/[dragonmtn]/snowwhite/akill.c
ViewVC logotype

Diff of /snowwhite/akill.c

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

revision 1.2 by Halcy0n, Tue Apr 12 06:53:45 2005 UTC revision 1.3 by Halcy0n, Sat Apr 16 21:15:39 2005 UTC
# Line 49  Line 49 
49  #include "hash.h"  #include "hash.h"
50  #include "email.h"  #include "email.h"
51  #include "log.h"  #include "log.h"
 #include "sipc.h"  
52  #include "timestr.h"  #include "timestr.h"
53    
54  /*******************************************************************/  /*******************************************************************/
# Line 100  time_t ops_e_last_time;                        ///< Time of l Line 99  time_t ops_e_last_time;                        ///< Time of l
99    
100  /*****************************************************************************/  /*****************************************************************************/
101    
 int IpcConnectType::sendAkills(int akillType, const char *searchText)  
 {  
         struct akill *ak;  
         char mask[NICKLEN + USERLEN + HOSTLEN + 3];  
         char length[16];  
         int x = 0;  
   
         if (!firstBanItem)  
                 return 0;  
   
         for (ak = firstBanItem; ak; ak = ak->next) {  
                 if (ak->type == akillType || ak->type == 0) {  
                         strcpy(mask, ak->nick);  
                         strcat(mask, "!");  
                         strcat(mask, ak->user);  
                         strcat(mask, "@");  
                         strcat(mask, ak->host);  
   
                         if (searchText && strcmp(mask, searchText) )  
                                 continue;  
   
                         if (ak->unset)  
                                 sprintf(length, "%luh",  
                                                 (long)(ak->unset - ak->set) / 3600);  
                         else  
                                 strcpy(length, "forever");  
   
                         fWriteLn("DATA %ld %ld %s %s :%s", ak->set, ak->unset, length, mask, ak->reason);  
                         x++;  
                 }  
         }  
         return x;  
 }  
   
102  /**  /**
103   * \brief Excluded the given nick from akill mailings to ops@ and kline@   * \brief Excluded the given nick from akill mailings to ops@ and kline@
104   * \param nick -- The setter to be excluded, non-null zero terminated char array   * \param nick -- The setter to be excluded, non-null zero terminated char array

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26