Browse Source

Merge branch 'hub-remotecmd' into next

* hub-remotecmd:
  Validate that remotecmd is coming from a HUB
Bryan Drewery 13 years ago
parent
commit
f551e41283
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/botcmd.c

+ 5 - 0
src/botcmd.c

@@ -158,6 +158,11 @@ void bot_remotecmd(int idx, char *par) {
     return;
   }
 
+  if (!dcc[idx].hub) {
+    fake_alert(idx, fbot, "hub", "rc");
+    return;
+  }
+
   if (!strcasecmp(tbot, conf.bot->nick)) {
     gotremotecmd(tbot, fbot, fhnd, fidx, par);
   } else if (!strcmp(tbot, "*")) {