Browse Source

* tclmisc.c: (expmem_misc): Forgot to remove int i;
* Added putallbots() alias for zapfb, and exported that and putbot() to modules


svn: 142

Bryan Drewery 23 years ago
parent
commit
b7ee91065f
6 changed files with 20 additions and 2 deletions
  1. 11 0
      src/botmsg.c
  2. 1 0
      src/eggdrop.h
  3. 3 0
      src/mod/module.h
  4. 3 1
      src/modules.c
  5. 1 0
      src/proto.h
  6. 1 1
      src/tclmisc.c

+ 11 - 0
src/botmsg.c

@@ -398,6 +398,16 @@ void botnet_send_reject(int idx, char *fromp, char *frombot, char *top,
     tputs(dcc[idx].sock, OBUF, l);
     tputs(dcc[idx].sock, OBUF, l);
   }
   }
 }
 }
+
+void putallbots(char *par)
+{ 
+  char msg[sgrab-110];
+  if (!par || !par[0])
+    return;
+  strncpyz(msg, par, sizeof msg);
+  botnet_send_zapf_broad(-1, botnetnick, NULL, msg);
+}
+
 void putbot(char *bot, char *par)
 void putbot(char *bot, char *par)
 {
 {
   int i;
   int i;
@@ -410,6 +420,7 @@ void putbot(char *bot, char *par)
   strncpyz(msg, par, sizeof msg);
   strncpyz(msg, par, sizeof msg);
   botnet_send_zapf(i, botnetnick, bot, msg);
   botnet_send_zapf(i, botnetnick, bot, msg);
 }
 }
+
 void botnet_send_zapf(int idx, char *a, char *b, char *c)
 void botnet_send_zapf(int idx, char *a, char *b, char *c)
 {
 {
   int l;
   int l;

+ 1 - 0
src/eggdrop.h

@@ -322,6 +322,7 @@ struct dcc_t {
 #endif /* USE_IPV6 */
 #endif /* USE_IPV6 */
   unsigned int port;
   unsigned int port;
   struct userrec *user;
   struct userrec *user;
+  char simul[NICKLEN];		/* used for hub->leaf cmd simulation, holds bot that results should be sent to */
   char hash[33];                /* used for dcc authing */
   char hash[33];                /* used for dcc authing */
   char nick[NICKLEN];
   char nick[NICKLEN];
   char host[UHOSTLEN];
   char host[UHOSTLEN];

+ 3 - 0
src/mod/module.h

@@ -536,6 +536,9 @@
 #define egg_inet_ntop ((int (*)(int af, const void *src, char *dst, socklen_t size))global[329])
 #define egg_inet_ntop ((int (*)(int af, const void *src, char *dst, socklen_t size))global[329])
 #define hostprotocol ((int (*) (char *))global[330])
 #define hostprotocol ((int (*) (char *))global[330])
 #define sdprintf (global[331])
 #define sdprintf (global[331])
+#define putbot ((void (*)(char *, char *))global[332])
+/* 333 - 335 */
+#define putallbots ((void (*)(char *))global[333])
 
 
 
 
 
 

+ 3 - 1
src/modules.c

@@ -579,7 +579,9 @@ Function global_table[] =
   (Function) egg_inet_ntop,
   (Function) egg_inet_ntop,
   (Function) open_listen,
   (Function) open_listen,
   (Function) hostprotocol,
   (Function) hostprotocol,
-  (Function) sdprintf
+  (Function) sdprintf,
+  (Function) putbot,
+  (Function) putallbots
 
 
 
 
 };
 };

+ 1 - 0
src/proto.h

@@ -94,6 +94,7 @@ int getparty(char *, int);
 void botnet_send_cfg(int idx, struct cfg_entry *entry);
 void botnet_send_cfg(int idx, struct cfg_entry *entry);
 void botnet_send_cfg_broad(int idx, struct cfg_entry *entry);
 void botnet_send_cfg_broad(int idx, struct cfg_entry *entry);
 void putbot(char *, char *);
 void putbot(char *, char *);
+void putallbots(char *);
 int add_note(char *, char *, char *, int, int);
 int add_note(char *, char *, char *, int, int);
 int simple_sprintf EGG_VARARGS(char *, arg1);
 int simple_sprintf EGG_VARARGS(char *, arg1);
 void tandout_but EGG_VARARGS(int, arg1);
 void tandout_but EGG_VARARGS(int, arg1);

+ 1 - 1
src/tclmisc.c

@@ -24,7 +24,7 @@ extern Tcl_Interp *interp;
 
 
 int expmem_tclmisc()
 int expmem_tclmisc()
 {
 {
-  int i, tot = 0;
+  tot = 0;
   return tot;
   return tot;
 }
 }