1
0
Эх сурвалжийг харах

* Add cmd 'release' and msg-release for releasing a bot's jupenick on a 7 second timer.

Bryan Drewery 16 жил өмнө
parent
commit
27e01337b5

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* Add cmd 'release' and msg-release for releasing a bot's jupenick on a 7 second timer.
+
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes
   * Binary error messages are no longer obscure numbers or fake segfaults. (Compile with OBSCURE_ERRORS to re-enable)

+ 6 - 0
doc/help.txt

@@ -1489,6 +1489,12 @@ See also: restart
    relay to. Typing '%dquit' or "*bye*" on a line by itself will end the relay.
  
 See also: bots%{+n}, newleaf%{-}%{+a}, -bot%{-}
+:leaf:release
+###  $bservers$b
+   Releases the bot's nick if it is on the jupenick. It gives an estimated
+   7 seconds before it attempts to regain its jupenick.
+ 
+See also: set
 ::reload
 ###  $breload$b
    Reloads the bot's user file, discarding any changes made since the last

+ 6 - 0
src/mod/irc.mod/cmdsirc.c

@@ -476,6 +476,11 @@ static void cmd_devoice(int idx, char *par)
 
 }
 
+static void cmd_release(int idx, char *par) {
+  putlog(LOG_CMDS, "*", "#%s# release", dcc[idx].nick);
+  release_nick();
+}
+
 static void cmd_op(int idx, char *par)
 {
   struct chanset_t *chan = NULL;
@@ -1908,6 +1913,7 @@ static cmd_t irc_dcc[] =
   {"msg",		"o",	 (Function) cmd_msg,		NULL, LEAF|AUTH},
   {"nick",		"m",	 (Function) cmd_nick,		NULL, LEAF},
   {"op",		"o|o",	 (Function) cmd_op,		NULL, LEAF|AUTH},
+  {"release",		"m",	 (Function) cmd_release,	NULL, LEAF|AUTH},
   {"reset",		"m|m",	 (Function) cmd_reset,		NULL, LEAF|AUTH},
   {"resetbans",		"o|o",	 (Function) cmd_resetbans,	NULL, LEAF|AUTH},
   {"resetexempts",	"o|o",	 (Function) cmd_resetexempts,	NULL, LEAF|AUTH},