Make m_okick support the new +J format.

This commit is contained in:
B.Greenham 2010-03-05 13:59:35 -05:00
parent b5285733d3
commit 559d530111
2 changed files with 2 additions and 5 deletions

2
NEWS
View File

@ -16,7 +16,7 @@ new modes
- Add cmode +N which disallows users from changing their nick while they're on - Add cmode +N which disallows users from changing their nick while they're on
a channel with this mode set. a channel with this mode set.
- Add cmode +K (norepeat) which will block repeated messages, regardless of - Add cmode +K (norepeat) which will block repeated messages, regardless of
- who they're from. who they're from.
- Add cmode +G which blocks messages containing 50% or more capital letters - Add cmode +G which blocks messages containing 50% or more capital letters
from being sent to the channel. from being sent to the channel.
- Add cmode +J which disallows a kicked user from rejoining within 'X' seconds - Add cmode +J which disallows a kicked user from rejoining within 'X' seconds

View File

@ -69,7 +69,6 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
char *p = NULL; char *p = NULL;
char *user; char *user;
static char buf[BUFSIZE]; static char buf[BUFSIZE];
char *text = rb_strdup("");
if(*parv[2] == '\0') if(*parv[2] == '\0')
{ {
@ -138,10 +137,8 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
":%s KICK %s %s :%s", me.id, chptr->chname, who->id, comment); ":%s KICK %s %s :%s", me.id, chptr->chname, who->id, comment);
remove_user_from_channel(msptr); remove_user_from_channel(msptr);
rb_sprintf(text, "K%s", target_p->name);
/* we don't need to track NOREJOIN stuff unless it's our client being kicked */ /* we don't need to track NOREJOIN stuff unless it's our client being kicked */
if(MyClient(target_p) && chptr->mode.mode & MODE_NOREJOIN) if(MyClient(target_p) && chptr->mode.mode & MODE_NOREJOIN)
channel_metadata_time_add(chptr, text, rb_current_time()); channel_metadata_time_add(chptr, "KICKNOREJOIN", rb_current_time(), target_p->id);
return 0; return 0;
} }