src/mod/wire.mod/wire.c File Reference

#include "src/mod/module.h"
#include <time.h>
#include "src/users.h"
#include "src/chan.h"
#include "wire.h"
Include dependency graph for wire.c:

Go to the source code of this file.

Data Structures

struct  wire_t

Defines

#define MODULE_NAME   "wire"
#define MAKING_WIRE

Typedefs

typedef struct wire_t wire_list

Functions

static void wire_leave ()
static void wire_join ()
static void wire_display ()
static int wire_expmem ()
static void nsplit (char *to, char *from)
static void wire_filter (char *from, char *cmd, char *param)
static void wire_display (int idx, char *key, char *from, char *message)
static int cmd_wirelist (struct userrec *u, int idx, char *par)
static int cmd_onwire (struct userrec *u, int idx, char *par)
static int cmd_wire (struct userrec *u, int idx, char *par)
static char * chof_wire (char *from, int idx)
static void wire_join (int idx, char *key)
static void wire_leave (int sock)
static char * cmd_putwire (int idx, char *message)
static void wire_report (int idx, int details)
static char * wire_close ()
char * wire_start ()
char * wire_start (Function *global_funcs)

Variables

static Functionglobal = 0
static Functionencryption_funcs = 0
static wire_listwirelist
static cmd_t wire_bot []
static cmd_t wire_dcc []
static cmd_t wire_chof []
static cmd_t wire_filt []
static Function wire_table []

Define Documentation

#define MAKING_WIRE

Definition at line 39 of file wire.c.

#define MODULE_NAME   "wire"

Definition at line 38 of file wire.c.


Typedef Documentation

typedef struct wire_t wire_list

Function Documentation

static char* chof_wire ( char *  from,
int  idx 
) [static]

Definition at line 323 of file wire.c.

References dcc, NULL, wire_t::sock, and wire_leave().

00324 {
00325   wire_leave(dcc[idx].sock);
00326   return NULL;
00327 }

Here is the call graph for this function:

static int cmd_onwire ( struct userrec u,
int  idx,
char *  par 
) [static]

Definition at line 224 of file wire.c.

References botnet_send_zapf_broad, botnetnick, dcc, dprintf, encrypt_string, findanyidx, geticon, wire_t::key, wire_t::next, nfree, now, simple_sprintf, wire_t::sock, time_t, WIRE_AWAY, WIRE_CURRENTLYON, WIRE_IDLE, and WIRE_NOTONWIRE.

Referenced by cmd_wire().

00225 {
00226   wire_list *w, *w2;
00227   char wiretmp[512], wirecmd[512], idxtmp[512];
00228   char idle[20], *enctmp;
00229   time_t now2 = now;
00230 
00231   w = wirelist;
00232   while (w) {
00233     if (w->sock == dcc[idx].sock)
00234       break;
00235     w = w->next;
00236   }
00237   if (!w) {
00238     dprintf(idx, "%s\n", WIRE_NOTONWIRE);
00239     return 0;
00240   }
00241   dprintf(idx, "----- %s '%s':\n", WIRE_CURRENTLYON, w->key);
00242   dprintf(idx, "----- Nick       Bot        Host\n");
00243   dprintf(idx, "----- ---------- ---------- ------------------------------\n");
00244   enctmp = encrypt_string(w->key, "wire");
00245   sprintf(wirecmd, "!wire%s", enctmp);
00246   nfree(enctmp);
00247   enctmp = encrypt_string(w->key, dcc[idx].nick);
00248   strcpy(wiretmp, enctmp);
00249   nfree(enctmp);
00250   simple_sprintf(idxtmp, "!wirereq %d %s", dcc[idx].sock, wiretmp);
00251   botnet_send_zapf_broad(-1, botnetnick, wirecmd, idxtmp);
00252   w2 = wirelist;
00253   while (w2) {
00254     if (!strcmp(w2->key, w->key)) {
00255       int idx2 = findanyidx(w2->sock);
00256 
00257       if (now2 - dcc[idx2].timeval > 300) {
00258         unsigned long Days, hrs, mins;
00259 
00260         Days = (now2 - dcc[idx2].timeval) / 86400;
00261         hrs = ((now2 - dcc[idx2].timeval) - (Days * 86400)) / 3600;
00262         mins = ((now2 - dcc[idx2].timeval) - (hrs * 3600)) / 60;
00263         if (Days > 0)
00264           sprintf(idle, " [%s %lud%luh]", WIRE_IDLE, Days, hrs);
00265         else if (hrs > 0)
00266           sprintf(idle, " [%s %luh%lum]", WIRE_IDLE, hrs, mins);
00267         else
00268           sprintf(idle, " [%s %lum]", WIRE_IDLE, mins);
00269       } else
00270         idle[0] = 0;
00271       dprintf(idx, "----- %c%-9s %-9s  %s%s\n",
00272               geticon(idx2), dcc[idx2].nick, botnetnick, dcc[idx2].host, idle);
00273       if (dcc[idx2].u.chat->away)
00274         dprintf(idx, "-----    %s: %s\n", WIRE_AWAY, dcc[idx2].u.chat->away);
00275     }
00276     w2 = w2->next;
00277   }
00278   return 0;
00279 }

Here is the caller graph for this function:

static char* cmd_putwire ( int  idx,
char *  message 
) [static]

Definition at line 467 of file wire.c.

References botnet_send_zapf_broad, botnetnick, dcc, encrypt_string, findanyidx, wire_t::key, wire_t::next, nfree, wire_t::sock, and wire_display().

00468 {
00469   wire_list *w = wirelist;
00470   wire_list *w2 = wirelist;
00471   int wiretype;
00472   char wirecmd[512];
00473   char wiremsg[512];
00474   char wiretmp[512];
00475   char wiretmp2[512];
00476   char *enctmp;
00477 
00478   while (w) {
00479     if (w->sock == dcc[idx].sock)
00480       break;
00481     w = w->next;
00482   }
00483   if (!w)
00484     return "";
00485   if (!message[1])
00486     return "";
00487   if ((strlen(message) > 3) && !strncmp(&message[1], "me", 2) &&
00488       (message[3] == ' ')) {
00489     sprintf(wiretmp2, "!%s@%s", dcc[idx].nick, botnetnick);
00490     enctmp = encrypt_string(w->key, &message[3]);
00491     wiretype = 1;
00492   } else {
00493     sprintf(wiretmp2, "%s@%s", dcc[idx].nick, botnetnick);
00494     enctmp = encrypt_string(w->key, &message[1]);
00495     wiretype = 0;
00496   }
00497   strcpy(wiremsg, enctmp);
00498   nfree(enctmp);
00499   enctmp = encrypt_string(w->key, "wire");
00500   strcpy(wiretmp, enctmp);
00501   nfree(enctmp);
00502   sprintf(wirecmd, "!wire%s", wiretmp);
00503   sprintf(wiretmp, "%s %s", wiretmp2, wiremsg);
00504   botnet_send_zapf_broad(-1, botnetnick, wirecmd, wiretmp);
00505   sprintf(wiretmp, "%s%s", wiretype ? "!" : "", dcc[findanyidx(w->sock)].nick);
00506   while (w2) {
00507     if (!strcmp(w2->key, w->key))
00508       wire_display(findanyidx(w2->sock), w2->key, wiretmp, wiremsg);
00509     w2 = w2->next;
00510   }
00511   return "";
00512 }

Here is the call graph for this function:

static int cmd_wire ( struct userrec u,
int  idx,
char *  par 
) [static]

Definition at line 281 of file wire.c.

References cmd_onwire(), dcc, dprintf, egg_strcasecmp, wire_t::key, MISC_USAGE, wire_t::next, wire_t::sock, WIRE_CHANGINGKEY, WIRE_CURRENTLYON, WIRE_INFO1, WIRE_INFO2, WIRE_INFO3, wire_join(), wire_leave(), WIRE_NOLONGERWIRED, and WIRE_NOTONWIRE.

00282 {
00283   wire_list *w = wirelist;
00284 
00285   if (!par[0]) {
00286     dprintf(idx, "%s: .wire [<encrypt-key>|OFF|info]\n", MISC_USAGE);
00287     return 0;
00288   }
00289   while (w) {
00290     if (w->sock == dcc[idx].sock)
00291       break;
00292     w = w->next;
00293   }
00294   if (!egg_strcasecmp(par, "off")) {
00295     if (w) {
00296       wire_leave(w->sock);
00297       dprintf(idx, "%s\n", WIRE_NOLONGERWIRED);
00298       return 0;
00299     }
00300     dprintf(idx, "%s\n", WIRE_NOTONWIRE);
00301     return 0;
00302   }
00303   if (!egg_strcasecmp(par, "info")) {
00304     if (w)
00305       dprintf(idx, "%s '%s'.\n", WIRE_CURRENTLYON, w->key);
00306     else
00307       dprintf(idx, "%s\n", WIRE_NOTONWIRE);
00308     return 0;
00309   }
00310   if (w) {
00311     dprintf(idx, "%s %s...\n", WIRE_CHANGINGKEY, par);
00312     wire_leave(w->sock);
00313   } else {
00314     dprintf(idx, "----- %s\n", WIRE_INFO1);
00315     dprintf(idx, "----- %s\n", WIRE_INFO2);
00316     dprintf(idx, "----- %s\n", WIRE_INFO3);
00317   }
00318   wire_join(idx, par);
00319   cmd_onwire((struct userrec *) 0, idx, "");
00320   return 0;
00321 }

Here is the call graph for this function:

static int cmd_wirelist ( struct userrec u,
int  idx,
char *  par 
) [static]

Definition at line 210 of file wire.c.

References dprintf, findanyidx, wire_t::next, and wire_t::sock.

00211 {
00212   wire_list *w = wirelist;
00213   int entry = 0;
00214 
00215   dprintf(idx, "Current Wire table:  (Base table address = %p)\n", w);
00216   while (w) {
00217     dprintf(idx, "entry %d: w=%p  idx=%d  sock=%d  next=%p\n",
00218             ++entry, w, findanyidx(w->sock), w->sock, w->next);
00219     w = w->next;
00220   }
00221   return 0;
00222 }

static void nsplit ( char *  to,
char *  from 
) [static]

Definition at line 93 of file wire.c.

References newsplit.

Referenced by wire_filter().

00094 {
00095   char *x, *y = from;
00096 
00097   x = newsplit(&y);
00098   strcpy(to, x);
00099   strcpy(from, y);
00100 }

Here is the caller graph for this function:

static char* wire_close (  )  [static]

Definition at line 549 of file wire.c.

References del_lang_section, dprintf, encrypt_string, find_bind_table, findanyidx, cmd_t::flags, cmd_t::func, H_bot, H_dcc, wire_t::key, MODULE_NAME, module_undepend, cmd_t::name, wire_t::next, nfree, NULL, rem_builtins, rem_help_reference, wire_t::sock, wire_filter(), wire_leave(), WIRE_NOLONGERWIRED, and WIRE_UNLOAD.

00550 {
00551   wire_list *w = wirelist;
00552   char wiretmp[512];
00553   char *enctmp;
00554   p_tcl_bind_list H_temp;
00555 
00556   /* Remove any current wire encrypt bindings for now, don't worry
00557    * about duplicate unbinds.
00558    */
00559   while (w) {
00560     enctmp = encrypt_string(w->key, "wire");
00561     sprintf(wiretmp, "!wire%s", enctmp);
00562     nfree(enctmp);
00563     wire_bot[0].name = wiretmp;
00564     wire_bot[0].flags = "";
00565     wire_bot[0].func = (IntFunc) wire_filter;
00566     rem_builtins(H_bot, wire_bot);
00567     w = w->next;
00568   }
00569   w = wirelist;
00570   while (w && w->sock) {
00571     dprintf(findanyidx(w->sock), "----- %s\n", WIRE_UNLOAD);
00572     dprintf(findanyidx(w->sock), "----- %s\n", WIRE_NOLONGERWIRED);
00573     wire_leave(w->sock);
00574     w = wirelist;
00575   }
00576   rem_help_reference("wire.help");
00577   rem_builtins(H_dcc, wire_dcc);
00578   H_temp = find_bind_table("filt");
00579   rem_builtins(H_temp, wire_filt);
00580   H_temp = find_bind_table("chof");
00581   rem_builtins(H_temp, wire_chof);
00582   del_lang_section("wire");
00583   module_undepend(MODULE_NAME);
00584   return NULL;
00585 }

Here is the call graph for this function:

static void wire_display ( int  idx,
char *  key,
char *  from,
char *  message 
) [static]

Definition at line 198 of file wire.c.

References decrypt_string, dprintf, and nfree.

00199 {
00200   char *enctmp;
00201 
00202   enctmp = decrypt_string(key, message);
00203   if (from[0] == '!')
00204     dprintf(idx, "----- > %s %s\n", &from[1], enctmp + 1);
00205   else
00206     dprintf(idx, "----- <%s> %s\n", from, enctmp);
00207   nfree(enctmp);
00208 }

static void wire_display (  )  [static]

Referenced by cmd_putwire(), and wire_filter().

Here is the caller graph for this function:

static int wire_expmem (  )  [static]

Definition at line 79 of file wire.c.

References wire_t::crypt, wire_t::key, and wire_t::next.

Referenced by wire_report().

00080 {
00081   wire_list *w = wirelist;
00082   int size = 0;
00083 
00084   while (w) {
00085     size += sizeof(wire_list);
00086     size += strlen(w->crypt) + 1;
00087     size += strlen(w->key) + 1;
00088     w = w->next;
00089   }
00090   return size;
00091 }

Here is the caller graph for this function:

static void wire_filter ( char *  from,
char *  cmd,
char *  param 
) [static]

Definition at line 102 of file wire.c.

References botnetnick, wire_t::crypt, dcc, decrypt_string, dprintf, encrypt_string, findanyidx, geticon, wire_t::key, wire_t::next, nextbot, nfree, now, nsplit(), wire_t::sock, time_t, WIRE_AWAY, wire_display(), and WIRE_IDLE.

Referenced by wire_close(), wire_join(), and wire_leave().

00103 {
00104   char wirecrypt[512];
00105   char wirewho[512];
00106   char wiretmp2[512];
00107   char wiretmp[512];
00108   char wirereq[512];
00109   wire_list *w = wirelist;
00110   char reqsock;
00111   time_t now2 = now;
00112   char idle[20];
00113   char *enctmp;
00114 
00115   strcpy(wirecrypt, &cmd[5]);
00116   strcpy(wiretmp, param);
00117   nsplit(wirereq, param);
00118 
00119 /*
00120  * !wire<crypt"wire"> !wirereq <destbotsock> <crypt"destbotnick">
00121  * -----  wirecrypt    wirereq    wirewho         param
00122  */
00123 
00124   if (!strcmp(wirereq, "!wirereq")) {
00125     nsplit(wirewho, param);
00126     while (w) {
00127       if (!strcmp(w->crypt, wirecrypt)) {
00128         int idx = findanyidx(w->sock);
00129 
00130         reqsock = atoi(wirewho);
00131         if (now2 - dcc[idx].timeval > 300) {
00132           unsigned long Days, hrs, mins;
00133 
00134           Days = (now2 - dcc[idx].timeval) / 86400;
00135           hrs = ((now2 - dcc[idx].timeval) - (Days * 86400)) / 3600;
00136           mins = ((now2 - dcc[idx].timeval) - (hrs * 3600)) / 60;
00137           if (Days > 0)
00138             sprintf(idle, " [%s %lud%luh]", WIRE_IDLE, Days, hrs);
00139           else if (hrs > 0)
00140             sprintf(idle, " [%s %luh%lum]", WIRE_IDLE, hrs, mins);
00141           else
00142             sprintf(idle, " [%s %lum]", WIRE_IDLE, mins);
00143         } else
00144           idle[0] = 0;
00145         sprintf(wirereq, "----- %c%-9s %-9s  %s%s",
00146                 geticon(idx), dcc[idx].nick, botnetnick, dcc[idx].host, idle);
00147         enctmp = encrypt_string(w->key, wirereq);
00148         strcpy(wiretmp, enctmp);
00149         nfree(enctmp);
00150         sprintf(wirereq, "zapf %s %s !wire%s !wireresp %s %s %s",
00151                 botnetnick, from, wirecrypt, wirewho, param, wiretmp);
00152         dprintf(nextbot(from), "%s\n", wirereq);
00153         if (dcc[idx].u.chat->away) {
00154           sprintf(wirereq, "-----    %s: %s\n", WIRE_AWAY,
00155                   dcc[idx].u.chat->away);
00156           enctmp = encrypt_string(w->key, wirereq);
00157           strcpy(wiretmp, enctmp);
00158           nfree(enctmp);
00159           sprintf(wirereq, "zapf %s %s !wire%s !wireresp %s %s %s",
00160                   botnetnick, from, wirecrypt, wirewho, param, wiretmp);
00161           dprintf(nextbot(from), "%s\n", wirereq);
00162         }
00163       }
00164       w = w->next;
00165     }
00166     return;
00167   }
00168   if (!strcmp(wirereq, "!wireresp")) {
00169     nsplit(wirewho, param);
00170     reqsock = atoi(wirewho);
00171     w = wirelist;
00172     nsplit(wiretmp2, param);
00173     while (w) {
00174       if (w->sock == reqsock) {
00175         int idx = findanyidx(reqsock);
00176 
00177         enctmp = decrypt_string(w->key, wiretmp2);
00178         strcpy(wirewho, enctmp);
00179         nfree(enctmp);
00180         if (!strcmp(dcc[idx].nick, wirewho)) {
00181           enctmp = decrypt_string(w->key, param);
00182           dprintf(idx, "%s\n", enctmp);
00183           nfree(enctmp);
00184           return;
00185         }
00186       }
00187       w = w->next;
00188     }
00189     return;
00190   }
00191   while (w) {
00192     if (!strcmp(wirecrypt, w->crypt))
00193       wire_display(findanyidx(w->sock), w->key, wirereq, param);
00194     w = w->next;
00195   }
00196 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void wire_join ( int  idx,
char *  key 
) [static]

Definition at line 329 of file wire.c.

References add_builtins, botnet_send_zapf_broad, botnetnick, wire_t::crypt, dcc, dprintf, encrypt_string, findanyidx, cmd_t::flags, cmd_t::func, H_bot, wire_t::key, cmd_t::name, wire_t::next, nfree, nmalloc, simple_sprintf, wire_t::sock, wire_filter(), and WIRE_JOINED.

00330 {
00331   char wirecmd[512];
00332   char wiremsg[512];
00333   char wiretmp[512];
00334   char *enctmp;
00335   wire_list *w = wirelist, *w2;
00336 
00337   while (w) {
00338     if (w->next == 0)
00339       break;
00340     w = w->next;
00341   }
00342   if (!wirelist) {
00343     wirelist = nmalloc(sizeof *wirelist);
00344     w = wirelist;
00345   } else {
00346     w->next = nmalloc(sizeof *w->next);
00347     w = w->next;
00348   }
00349   w->sock = dcc[idx].sock;
00350   w->key = nmalloc(strlen(key) + 1);
00351   strcpy(w->key, key);
00352   w->next = 0;
00353   enctmp = encrypt_string(w->key, "wire");
00354   strcpy(wiretmp, enctmp);
00355   nfree(enctmp);
00356   w->crypt = nmalloc(strlen(wiretmp) + 1);
00357   strcpy(w->crypt, wiretmp);
00358   sprintf(wirecmd, "!wire%s", wiretmp);
00359   sprintf(wiremsg, "%s joined wire '%s'", dcc[idx].nick, key);
00360   enctmp = encrypt_string(w->key, wiremsg);
00361   strcpy(wiretmp, enctmp);
00362   nfree(enctmp);
00363   {
00364     char x[1024];
00365 
00366     simple_sprintf(x, "%s %s", botnetnick, wiretmp);
00367     botnet_send_zapf_broad(-1, botnetnick, wirecmd, x);
00368   }
00369   w2 = wirelist;
00370   while (w2) {
00371     if (!strcmp(w2->key, w->key))
00372       dprintf(findanyidx(w2->sock), "----- %s %s '%s'.\n",
00373               dcc[findanyidx(w->sock)].nick, WIRE_JOINED, w2->key);
00374     w2 = w2->next;
00375   }
00376   w2 = wirelist;
00377   while (w2) {                  /* Is someone using this key here already? */
00378     if (w2 != w)
00379       if (!strcmp(w2->key, w->key))
00380         break;
00381     w2 = w2->next;
00382   }
00383   if (!w2) {                    /* Someone else is NOT using this key, so
00384                                  * we add a bind */
00385     wire_bot[0].name = wirecmd;
00386     wire_bot[0].flags = "";
00387     wire_bot[0].func = (IntFunc) wire_filter;
00388     add_builtins(H_bot, wire_bot);
00389   }
00390 }

Here is the call graph for this function:

static void wire_join (  )  [static]

Referenced by cmd_wire().

Here is the caller graph for this function:

static void wire_leave ( int  sock  )  [static]

Definition at line 392 of file wire.c.

References botnet_send_zapf_broad, botnetnick, wire_t::crypt, dcc, dprintf, encrypt_string, findanyidx, cmd_t::flags, cmd_t::func, H_bot, wire_t::key, cmd_t::name, wire_t::next, nfree, rem_builtins, simple_sprintf, wire_t::sock, wire_filter(), and WIRE_LEFT.

00393 {
00394   char wirecmd[513];
00395   char wiremsg[513];
00396   char wiretmp[513];
00397   char *enctmp;
00398   wire_list *w = wirelist;
00399   wire_list *w2 = wirelist;
00400   wire_list *wlast = wirelist;
00401 
00402   while (w) {
00403     if (w->sock == sock)
00404       break;
00405     w = w->next;
00406   }
00407   if (!w)
00408     return;
00409   enctmp = encrypt_string(w->key, "wire");
00410   strcpy(wirecmd, enctmp);
00411   nfree(enctmp);
00412   sprintf(wiretmp, "%s left the wire.", dcc[findanyidx(w->sock)].nick);
00413   enctmp = encrypt_string(w->key, wiretmp);
00414   strcpy(wiremsg, enctmp);
00415   nfree(enctmp);
00416   {
00417     char x[1024];
00418 
00419     simple_sprintf(x, "!wire%s %s", wirecmd, botnetnick);
00420     botnet_send_zapf_broad(-1, botnetnick, x, wiremsg);
00421   }
00422   w2 = wirelist;
00423   while (w2) {
00424     if (w2->sock != sock && !strcmp(w2->key, w->key)) {
00425       dprintf(findanyidx(w2->sock), "----- %s %s\n",
00426               dcc[findanyidx(w->sock)].nick, WIRE_LEFT);
00427     }
00428     w2 = w2->next;
00429   }
00430   /* Check to see if someone else is using this wire key.
00431    * If so, then don't remove the wire filter binding.
00432    */
00433   w2 = wirelist;
00434   while (w2) {
00435     if (w2 != w && !strcmp(w2->key, w->key))
00436       break;
00437     w2 = w2->next;
00438   }
00439   if (!w2) {                    /* Someone else is NOT using this key */
00440     wire_bot[0].name = wirecmd;
00441     wire_bot[0].flags = "";
00442     wire_bot[0].func = (IntFunc) wire_filter;
00443     rem_builtins(H_bot, wire_bot);
00444   }
00445   w2 = wirelist;
00446   wlast = 0;
00447   while (w2) {
00448     if (w2 == w)
00449       break;
00450     wlast = w2;
00451     w2 = w2->next;
00452   }
00453   if (wlast) {
00454     if (w->next)
00455       wlast->next = w->next;
00456     else
00457       wlast->next = 0;
00458   } else if (!w->next)
00459     wirelist = 0;
00460   else
00461     wirelist = w->next;
00462   nfree(w->crypt);
00463   nfree(w->key);
00464   nfree(w);
00465 }

Here is the call graph for this function:

static void wire_leave (  )  [static]

Referenced by chof_wire(), cmd_wire(), and wire_close().

Here is the caller graph for this function:

static void wire_report ( int  idx,
int  details 
) [static]

Definition at line 515 of file wire.c.

References count, dprintf, wire_t::next, and wire_expmem().

00516 {
00517   if (details) {
00518     int count = 0, size = wire_expmem();
00519     wire_list *w = wirelist;
00520 
00521     while (w) {
00522       count++;
00523       w = w->next;
00524     }
00525 
00526     dprintf(idx, "    %d wire%s\n", count, (count != 1) ? "s" : "");
00527     dprintf(idx, "    Using %d byte%s of memory\n", size,
00528             (size != 1) ? "s" : "");
00529   }
00530 }

Here is the call graph for this function:

char* wire_start ( Function global_funcs  ) 

Definition at line 596 of file wire.c.

References add_builtins, add_help_reference, add_lang_section, encryption_funcs, find_bind_table, global, H_chof, H_dcc, H_filt, module_depend, MODULE_NAME, module_register, module_undepend, and NULL.

00597 {
00598   p_tcl_bind_list H_temp;
00599 
00600   global = global_funcs;
00601 
00602   module_register(MODULE_NAME, wire_table, 2, 0);
00603   if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {
00604     module_undepend(MODULE_NAME);
00605     return "This module requires Eggdrop 1.6.0 or later.";
00606   }
00607 
00608   if (!(encryption_funcs = module_depend(MODULE_NAME, "encryption", 2, 1))) {
00609     module_undepend(MODULE_NAME);
00610     return "This module requires an encryption module.";
00611   }
00612 
00613   add_help_reference("wire.help");
00614   add_builtins(H_dcc, wire_dcc);
00615   H_temp = find_bind_table("filt");
00616   add_builtins(H_filt, wire_filt);
00617   H_temp = find_bind_table("chof");
00618   add_builtins(H_chof, wire_chof);
00619   wirelist = NULL;
00620   add_lang_section("wire");
00621   return NULL;
00622 }

char* wire_start (  ) 

Variable Documentation

Function * encryption_funcs = 0 [static]

Definition at line 59 of file wire.c.

Referenced by wire_start().

Function* global = 0 [static]

Definition at line 59 of file wire.c.

cmd_t wire_bot[] [static]
Initial value:
 {
  {0, 0, 0, 0},                 
  {0, 0, 0, 0}                  
}

Definition at line 70 of file wire.c.

cmd_t wire_chof[] [static]
Initial value:
 {
  {"*", "",    (IntFunc) chof_wire, "wire:chof"},
  { 0 ,  0 ,  0 ,                         0 }
}

Definition at line 539 of file wire.c.

cmd_t wire_dcc[] [static]
Initial value:
 {
  {"wire",     "",   (IntFunc) cmd_wire,      0 },
  {"onwire",   "",   (IntFunc) cmd_onwire,    0 },
  {"wirelist", "n",  (IntFunc) cmd_wirelist,  0 },
  { 0 ,        0 ,  0 ,                     0 }
}

Definition at line 532 of file wire.c.

cmd_t wire_filt[] [static]
Initial value:
 {
  {";*", "",   (IntFunc) cmd_putwire, "wire:filt"},
  { 0 ,  0 ,  0 ,                           0 }
}

Definition at line 544 of file wire.c.

Function wire_table[] [static]
Initial value:

Definition at line 589 of file wire.c.

wire_list* wirelist [static]

Definition at line 68 of file wire.c.


Generated on 7 Sep 2016 for Eggdrop by  doxygen 1.6.1