X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fopserv.c;h=0ce488403e0aea6300dee479518a57841e31f92e;hb=df0167a7589aae5bba7c966843fc006da17050c9;hp=210d64fac7d4a6a95a37bcc466d60cee765500f0;hpb=53ec12b0ab28cd925d323bb1e18a1c368dcd8e41;p=srvx.git diff --git a/src/opserv.c b/src/opserv.c index 210d64f..0ce4884 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -269,6 +269,7 @@ static const struct message_entry msgtab[] = { { "OSMSG_SVSNICK", "You have renamed $b%s$b to $b%s$b." }, { "OSMSG_SVSJOIN", "$b%s$b joined $b%s$b." }, { "OSMSG_SVSPART", "$b%s$b parted $b%s$b." }, + { "OSMSG_SVSKILL", "$b%s$b killed: $b%s$b." }, { "OSMSG_SVSMODE", "You have set mode $b%s$b for $b%s$b." }, { "OSMSG_SIMUL", "You have simuled $b%s$b: %s" }, { "OSMSG_DEVNULL_USER" , "[%s] %s %s" }, @@ -434,13 +435,13 @@ opserv_free_user_alert(void *data) } #if defined(GCC_VARMACROS) -# define opserv_debug(ARGS...) do { if (opserv_conf.debug_channel) send_channel_notice(opserv_conf.debug_channel, opserv, ARGS); } while (0) -# define opserv_alert(ARGS...) do { if (opserv_conf.alert_channel) send_channel_notice(opserv_conf.alert_channel, opserv, ARGS); } while (0) -# define opserv_custom_alert(CHAN, ARGS...) do { if (CHAN) send_target_message(4, (CHAN), opserv, ARGS); else if (opserv_conf.alert_channel) send_channel_notice(opserv_conf.alert_channel, opserv, ARGS); } while (0) +# define opserv_debug(ARGS...) do { if (opserv_conf.debug_channel) send_channel_message(opserv_conf.debug_channel, opserv, ARGS); } while (0) +# define opserv_alert(ARGS...) do { if (opserv_conf.alert_channel) send_channel_message(opserv_conf.alert_channel, opserv, ARGS); } while (0) +# define opserv_custom_alert(CHAN, ARGS...) do { if (CHAN) send_target_message(5, (CHAN), opserv, ARGS); else if (opserv_conf.alert_channel) send_channel_message(opserv_conf.alert_channel, opserv, ARGS); } while (0) #elif defined(C99_VARMACROS) -# define opserv_debug(...) do { if (opserv_conf.debug_channel) send_channel_notice(opserv_conf.debug_channel, opserv, __VA_ARGS__); } while (0) -# define opserv_alert(...) do { if (opserv_conf.alert_channel) send_channel_notice(opserv_conf.alert_channel, opserv, __VA_ARGS__); } while (0) -# define opserv_custom_alert(chan, ...) do { if (chan) send_target_message(4, chan, opserv, __VA_ARGS__); else if (opserv_conf.alert_channel) send_channel_notice(opserv_conf.alert_channel, opserv, __VA_ARGS__); } while (0) +# define opserv_debug(...) do { if (opserv_conf.debug_channel) send_channel_message(opserv_conf.debug_channel, opserv, __VA_ARGS__); } while (0) +# define opserv_alert(...) do { if (opserv_conf.alert_channel) send_channel_message(opserv_conf.alert_channel, opserv, __VA_ARGS__); } while (0) +# define opserv_custom_alert(chan, ...) do { if (chan) send_target_message(5, chan, opserv, __VA_ARGS__); else if (opserv_conf.alert_channel) send_channel_message(opserv_conf.alert_channel, opserv, __VA_ARGS__); } while (0) #endif /* A lot of these commands are very similar to what ChanServ can do, @@ -4790,6 +4791,17 @@ static MODCMD_FUNC(cmd_svspart) return 1; } +static MODCMD_FUNC(cmd_svskill) +{ + struct userNode *target; + if(!(target=GetUserH(argv[1]))) { + reply("OSMSG_SVSNONICK", argv[1]); + return 0; + } + DelUser(target, opserv, 1, argv[2]); + reply("OSMSG_SVSKILL",target->nick,argv[2]); + return 1; +} static MODCMD_FUNC(cmd_svsnick) { struct userNode *target; @@ -5104,6 +5116,7 @@ init_opserv(const char *nick) opserv_define_func("DEVNULL LIST", cmd_listdevnull, 200, 0, 0); opserv_define_func("SVSJOIN", cmd_svsjoin, 800, 0, 3); opserv_define_func("SVSPART", cmd_svspart, 800, 0, 3); + opserv_define_func("SVSKILL", cmd_svskill, 800, 0, 3); opserv_define_func("SVSMODE", cmd_svsmode, 800, 0, 3); opserv_define_func("SVSNICK", cmd_svsnick, 800, 0, 3); opserv_define_func("RELAY", cmd_relay, 800, 0, 0);