فهرست منبع

Validate that remotecmd is coming from a HUB

Bryan Drewery 13 سال پیش
والد
کامیت
6019eb907e
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      src/botcmd.c

+ 5 - 0
src/botcmd.c

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