Quellcode durchsuchen

* Port [3150] to 1.2.13
* Added cmd_umode (+m) to manually set bots' usermodes at will.


svn: 3151

Bryan Drewery vor 19 Jahren
Ursprung
Commit
dcccd7081c
2 geänderte Dateien mit 27 neuen und 7 gelöschten Zeilen
  1. 14 7
      misc/help.txt
  2. 13 0
      src/mod/server.mod/cmdsserv.c

+ 14 - 7
misc/help.txt

@@ -217,10 +217,10 @@ See also: reload, save
    every ban in the global ban list and on the channel. If you use 'bans
    every ban in the global ban list and on the channel. If you use 'bans
    <wildcard>', it will list all bans (active or not) that match against your
    <wildcard>', it will list all bans (active or not) that match against your
    wildcard. Consider it a 'bans all' list matched against your wildcard.
    wildcard. Consider it a 'bans all' list matched against your wildcard.
-
+ 
    If you use 'bans global', a full list of bans for EVERY channel will be
    If you use 'bans global', a full list of bans for EVERY channel will be
    displayed, including inactive/active bans on each channel. 
    displayed, including inactive/active bans on each channel. 
-
+ 
    The ban list may change according to which channel you're currently viewing
    The ban list may change according to which channel you're currently viewing
    in the console. Different bans may be active on different channels. If you
    in the console. Different bans may be active on different channels. If you
    specify a channel name, that channel will be used instead of your current
    specify a channel name, that channel will be used instead of your current
@@ -319,10 +319,10 @@ See also: netserver, servers%{+n}, set%{-}
    If there is a botset entry for 'name' and a set entry for 'name', 
    If there is a botset entry for 'name' and a set entry for 'name', 
    the bot will use the 'botset' entry. Otherwise, the 'set' entry
    the bot will use the 'botset' entry. Otherwise, the 'set' entry
    will be used for all options.
    will be used for all options.
-
+ 
    The <var> may have wildcards. Wildcards will only be used for listing
    The <var> may have wildcards. Wildcards will only be used for listing
    variable, not for setting.
    variable, not for setting.
-
+ 
    See 'set' for a full help listing.
    See 'set' for a full help listing.
  
  
 See also: set
 See also: set
@@ -951,7 +951,7 @@ See also: decrypt, randstring, md5, sha1
  
  
    If you use 'exempts global', a full list of exempts for EVERY channel will be
    If you use 'exempts global', a full list of exempts for EVERY channel will be
    displayed, including inactive/active exempts on each channel.
    displayed, including inactive/active exempts on each channel.
-
+ 
    The exempt list may change according to which channel you're currently
    The exempt list may change according to which channel you're currently
    viewing in the console. Different exempts may be active on different
    viewing in the console. Different exempts may be active on different
    channels. If you specify a channel name, that channel will be used instead
    channels. If you specify a channel name, that channel will be used instead
@@ -1081,7 +1081,7 @@ See also: console, iop
    use 'invites <wildcard>', it will list all invites (active or not) that
    use 'invites <wildcard>', it will list all invites (active or not) that
    match against your wildcard. Consider it a 'invites all' list matched
    match against your wildcard. Consider it a 'invites all' list matched
    against your wildcard.
    against your wildcard.
-
+ 
    If you use 'invites global', a full list of invites for EVERY channel will be
    If you use 'invites global', a full list of invites for EVERY channel will be
    displayed, including inactive/active invites on each channel.
    displayed, including inactive/active invites on each channel.
  
  
@@ -1477,7 +1477,7 @@ See also: reload, backup
 ###  $bset$b [<+/->list] [<var> [data|-]]
 ###  $bset$b [<+/->list] [<var> [data|-]]
    Sets various options. Type alone to see all set entries. To set
    Sets various options. Type alone to see all set entries. To set
    an entry do '%dset name VALUE'. Use '-' as a value to clear an entry.
    an entry do '%dset name VALUE'. Use '-' as a value to clear an entry.
-
+ 
    The <var> may have wildcards. Wildcards will only be used for listing
    The <var> may have wildcards. Wildcards will only be used for listing
    variable, not for setting.
    variable, not for setting.
  
  
@@ -1710,6 +1710,13 @@ See also: bots, bottree
    Stats groups are IRC, Botnet, Partyline, Transfer.mod and Misc.
    Stats groups are IRC, Botnet, Partyline, Transfer.mod and Misc.
  
  
 %{+m}See also: restart%{-}
 %{+m}See also: restart%{-}
+:leaf:umode
+###  $bumode$b <+flags>
+   Sets the given usermode flags for the bot.
+%{+a}
+ 
+See also: dump
+%{-}
 ::unlink
 ::unlink
 ###  $bunlink$b <bot|*> [reason]
 ###  $bunlink$b <bot|*> [reason]
    This disconnects the specified bot from the botnet (assuming it was linked
    This disconnects the specified bot from the botnet (assuming it was linked

+ 13 - 0
src/mod/server.mod/cmdsserv.c

@@ -45,6 +45,18 @@ static void cmd_dump(int idx, char *par)
   dprintf(DP_DUMP, "%s\n", replace(par, "$n", botname));
   dprintf(DP_DUMP, "%s\n", replace(par, "$n", botname));
 }
 }
 
 
+static void cmd_umode(int idx, char *par)
+{
+  putlog(LOG_CMDS, "*", "#%s# umode %s", dcc[idx].nick, par);
+
+  if (!par[0]) {
+    dprintf(idx, "Usage: umode <+flags>\n");
+    return;
+  }
+
+  dprintf(DP_SERVER, "MODE %s %s\n", botname, par);
+}
+
 static void cmd_jump(int idx, char *par)
 static void cmd_jump(int idx, char *par)
 {
 {
   char *other = NULL, *p = NULL;
   char *other = NULL, *p = NULL;
@@ -129,6 +141,7 @@ static cmd_t C_dcc_serv[] =
   {"dump",		"a",	(Function) cmd_dump,		NULL, LEAF},
   {"dump",		"a",	(Function) cmd_dump,		NULL, LEAF},
   {"jump",		"m",	(Function) cmd_jump,		NULL, LEAF},
   {"jump",		"m",	(Function) cmd_jump,		NULL, LEAF},
   {"servers",		"m",	(Function) cmd_servers,		NULL, LEAF},
   {"servers",		"m",	(Function) cmd_servers,		NULL, LEAF},
+  {"umode",		"m",	(Function) cmd_umode,		NULL, LEAF},
   {NULL,		NULL,	NULL,				NULL, 0}
   {NULL,		NULL,	NULL,				NULL, 0}
 };
 };