added cmd_giveowner
[NeonServV5.git] / bot_NeonServ.c
index e95c4a04fc9033b35681ed90005106ae89a5d7db..e74a890d3b14b4d94311538b16b026462fecce50 100644 (file)
@@ -78,6 +78,10 @@ static const struct default_language_entry msgtab[] = {
     {"NS_MDELUSER_DONE", "Deleted \002%d\002 account(s) matching \002%s\002 with access from \002%d\002 to \002%d\002 from the %s user list."},
     {"NS_TRIM_DURATION_TOO_SHORT", "You must include a minimum inactivity duration of at least %d seconds to trim."},
     {"NS_TRIM_DONE", "Trimmed \002%d users\002 with access from %d to %d from the %s user list who were inactive for at least %s."},
+    {"NS_GIVEOWNER_SELF", "You cannot give ownership to your own account."},
+    {"NS_GIVEOWNER_TIMEOUT", "You must wait %s before you can give ownership of \002%s\002 to someone else."},
+    {"NS_GIVEOWNER_CONFIRM", "To really give ownership to \002%1$s\002, you must use 'giveownership *%1$s %2$s'."},
+    {"NS_GIVEOWNER_DONE", "Ownership of \002%s\002 has been transferred to account \002%s\002."},
     {NULL, NULL}
 };
 
@@ -93,7 +97,7 @@ INCLUDE ALL CMD's HERE
 #include "cmd_neonserv_delme.c"
 #include "cmd_neonserv_mdeluser.c"
 #include "cmd_neonserv_trim.c"  /* TODO: trim bans */
-//#include "cmd_neonserv_giveownership.c"
+#include "cmd_neonserv_giveowner.c"
 #include "cmd_neonserv_users.c"
 #include "cmd_neonserv_up.c"
 #include "cmd_neonserv_down.c"
@@ -242,6 +246,7 @@ void init_NeonServ() {
     register_command(BOTID, "downall",      neonserv_cmd_downall,   0, 0);
     register_command(BOTID, "mdeluser",     neonserv_cmd_mdeluser,  2, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_REQUIRE_AUTH | CMDFLAG_CHECK_AUTH);
     register_command(BOTID, "trim",         neonserv_cmd_trim,      2, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_REQUIRE_AUTH | CMDFLAG_CHECK_AUTH);
+    register_command(BOTID, "giveowner",    neonserv_cmd_giveowner, 1, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_REQUIRE_AUTH | CMDFLAG_CHECK_AUTH);
     
     start_bots();
     bind_bot_ready(neonserv_bot_ready);