#define KEY_EXPIRES "expires"
#define KEY_TRIGGERED "triggered"
-#define CHANNEL_DEFAULT_FLAGS (CHANNEL_OFFCHANNEL | CHANNEL_UNREVIEWED)
+#define CHANNEL_DEFAULT_FLAGS (CHANNEL_UNREVIEWED)
#define CHANNEL_PRESERVED_FLAGS (CHANNEL_UNREVIEWED)
#define CHANNEL_DEFAULT_OPTIONS "lmoooanpcnat"
{ "CSMSG_MUST_BE_OPPED", "You must be a channel operator in $b%s$b to register it." },
{ "CSMSG_PROXY_FORBIDDEN", "You may not register a channel for someone else." },
{ "CSMSG_OWN_TOO_MANY", "%s already owns enough channels (at least %d); use FORCE to override." },
- { "CMSG_ALERT_REGISTERED" "%s registered to %s by %s." },
/* Do-not-register channels */
{ "CSMSG_NOT_DNR", "$b%s$b is not a valid channel name or *account." },
{ "CSMSG_UNREG_NODELETE", "$b%s$b is protected from unregistration." },
{ "CSMSG_CHAN_SUSPENDED", "$b$C$b access to $b%s$b has been temporarily suspended (%s)." },
{ "CSMSG_CONFIRM_UNREG", "To confirm this unregistration, you must use 'unregister %s'." },
- { "CMSG_ALERT_UNREGISTERED" "%s %s" },
/* Channel moving */
{ "CSMSG_MOVE_SUCCESS", "Channel registration has been moved to $b%s$b." },
{ "CSMSG_LC_H_TITLE", "support helper" },
{ "CSMSG_LAME_SMURF_TARGET", "%s is an IRC operator." },
{ "CSMSG_MYACCESS_COUNT", "%s has access in $b%d$b channels and is owner of $b%d$b channel(s)." },
- { "CSMSG_MYACCESS_COUNT_1", "%s has access in $b%d$b channel and is owner of $b%d$b channel(s)." },
+ { "CSMSG_MYACCESS_COUNT_1", "%s has access in $b%d$b channel and is owner of $b%d$b channel(s)." },
/* Seen information */
/* Toys */
{ "CSMSG_UNF_RESPONSE", "I don't want to be part of your sick fantasies!" },
{ "CSMSG_PING_RESPONSE", "Pong!" },
+ { "CSMSG_PONG_RESPONSE", "Ping!" },
{ "CSMSG_WUT_RESPONSE", "wut" },
{ "CSMSG_BAD_NUMBER", "$b%s$b is an invalid number. Please use a number greater than 1 with this command." },
{ "CSMSG_BAD_DIE_FORMAT", "I do not understand $b%s$b. Please use either a single number or standard 4d6+3 format." },
{ NULL, NULL }
};
+#define CSMSG_ALERT_REGISTERED "%s registered to %s by %s."
+#define CSMSG_ALERT_UNREGISTERED "%s %s"
+
/* eject_user and unban_user flags */
#define ACTION_KICK 0x0001
#define ACTION_BAN 0x0002
if(channel->expiry)
timeq_del(channel->expiry, chanserv_expire_channel, channel, 0);
channel->channel->channel_info = NULL;
-
+ sprintf(msgbuf, "%s %s", channel->channel->name, reason);
dict_delete(channel->notes);
if(!IsSuspended(channel))
DelChannelUser(chanserv, channel->channel, msgbuf, 0);
- chanserv_oper_message("CSMSG_ALERT_UNREGISTERED"", channel->channel->name, reason);
+
+ chanserv_oper_message(CSMSG_ALERT_UNREGISTERED, channel->channel->name, reason);
UnlockChannel(channel->channel);
free(channel);
registered_channels--;
struct handle_info *handle;
struct chanData *cData;
struct modeNode *mn;
- char reason[MAXLEN];
char *chan_name;
unsigned int new_channel, force=0;
struct do_not_register *dnr;
else
reply("CSMSG_REG_SUCCESS", channel->name);
- chanserv_oper_message("CSMSG_ALERT_REGISTERED", channel->name, handle->handle, user->handle_info->handle);
+ chanserv_oper_message(CSMSG_ALERT_REGISTERED, channel->name, handle->handle, user->handle_info->handle);
return 1;
}
return 1;
}
+static CHANSERV_FUNC(cmd_pong)
+{
+ if(channel)
+ {
+ char response[MAXLEN];
+ const char *fmt = user_find_message(user, "CSMSG_PONG_RESPONSE");
+ sprintf(response, "\ 2%s\ 2: %s", user->nick, fmt);
+ irc_privmsg(cmd->parent->bot, channel->name, response);
+ }
+ else
+ reply("CSMSG_PONG_RESPONSE");
+ return 1;
+}
+
static CHANSERV_FUNC(cmd_wut)
{
if(channel)
str = database_get_data(conf_node, "off_channel", RECDB_QSTRING);
off_channel = str ? atoi(str) : 0;
- str = database_get_data(conf_node, "oper_chan", RECDB_QSTRING);
+ str = database_get_data(conf_node, "oper_channel", RECDB_QSTRING);
if(str)
{
chanserv_conf.oper_channel = AddChannel(str, now, "+tinms", NULL);
DEFINE_COMMAND(unf, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(ping, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
+ DEFINE_COMMAND(pong, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(wut, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(8ball, 2, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(d, 2, 0, "flags", "+nolog,+toy,+acceptchan", NULL);