Bläddra i källkod

* Changed display for when a user uses an alias over partyline. (#116)
* Related to above change, invalid cmds are logged in a different order now for users.


svn: 2328

Bryan Drewery 21 år sedan
förälder
incheckning
257742be84
2 ändrade filer med 9 tillägg och 1 borttagningar
  1. 2 0
      doc/UPDATES
  2. 7 1
      src/core_binds.c

+ 2 - 0
doc/UPDATES

@@ -18,6 +18,8 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed many channel cmds blocking access due to +botbitch. (#141)
 * Now using g++3.3[.6] as g++3.4 was causing spontaneous SEGFAULTS(see cpu-spin bug) on FreeBSD.
 * Fixed aliases not properly using cmdpass given. (#140)
+* Changed display for when a user uses an alias over partyline. (#116)
+* Related to above change, invalid cmds are logged in a different order now for users.
 
 1.2.5
 * Fixed a segfault/cpu-spin with mode parsing. (#25)

+ 7 - 1
src/core_binds.c

@@ -71,6 +71,7 @@ bool check_aliases(int idx, const char *cmd, const char *args)
         simple_snprintf(myargs, size, "%s %s %s", pass, a, argsdup);
       } else
         simple_snprintf(myargs, size, "%s %s", a, argsdup);
+      putlog(LOG_CMDS, "*", "@ #%s# [%s -> %s %s] ...", dcc[idx].nick, cmd, p, a);
       check_bind_dcc(p, idx, myargs);
 
       if (myargs)
@@ -141,12 +142,14 @@ void real_check_bind_dcc(const char *cmd, int idx, const char *text, Auth *auth)
     if (!(entry->cflags & AUTH))
       return;
   }
+
   int hits = 0;
+  bool log_bad = 0;
 
   check_bind_hits(BT_dcc, cmd, &fr, &hits, idx, args);
 
   if (hits != 1)
-    putlog(LOG_CMDS, "*", "! #%s# %s %s", dcc[idx].nick, cmd, args);
+    log_bad = 1;
 
   if (hits == 0) {
     if (!check_aliases(idx, cmd, args)) 
@@ -154,6 +157,9 @@ void real_check_bind_dcc(const char *cmd, int idx, const char *text, Auth *auth)
   } else if (hits > 1)
     dprintf(idx, "Ambiguous command.\n");
 
+  if (log_bad)
+    putlog(LOG_CMDS, "*", "! #%s# %s %s", dcc[idx].nick, cmd, args);
+
   free(args);
 }