1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 17:53:13 +02:00

Using /invite with no parameters now lists the channels you are invited to but have not yet joined

This commit is contained in:
codemastr
2004-11-25 19:16:02 +00:00
parent 4c66f198c5
commit a11e6df64b
5 changed files with 32 additions and 9 deletions
+3
View File
@@ -471,3 +471,6 @@
- Some unreal32docs->security section improvements.
- Fixed a minor bug in the new config system when displaying link {} and set::hosts errors
(#0002194) reported by AngryWolf.
- Renamed RPL_INVITELIST/RPL_ENDOFINVITELIST to RPL_INVEXLIST/RPL_ENDOFINVEXLIST
- Using /invite with no parameters now lists the channels you are invited to but have not
yet joined (#0002190) suggested by sac.
+6 -2
View File
@@ -182,6 +182,9 @@
#define RPL_TOPIC 332
#define RPL_TOPICWHOTIME 333
#define RPL_INVITELIST 336
#define RPL_ENDOFINVITELIST 337
#define RPL_LISTSYNTAX 334
#define RPL_WHOISBOT 335
#define RPL_USERIP 340
@@ -194,8 +197,8 @@
#define RPL_ENDOFWHO 315
#define RPL_NAMREPLY 353
#define RPL_ENDOFNAMES 366
#define RPL_INVITELIST 346
#define RPL_ENDOFINVITELIST 347
#define RPL_INVEXLIST 346
#define RPL_ENDOFINVEXLIST 347
#define RPL_EXLIST 348
#define RPL_ENDOFEXLIST 349
@@ -310,6 +313,7 @@
#define RPL_HELPFWD 294
#define RPL_HELPIGN 295
/*
* New /MAP format.
*/
+1 -1
View File
@@ -1379,7 +1379,7 @@ CMD_FUNC(m_mode)
{
if (!IsMember(sptr, chptr))
return 0;
sendto_one(sptr, rpl_str(RPL_ENDOFINVITELIST), me.name,
sendto_one(sptr, rpl_str(RPL_ENDOFINVEXLIST), me.name,
sptr->name, chptr->chname);
return 0;
}
+17 -1
View File
@@ -80,6 +80,20 @@ DLLFUNC int MOD_UNLOAD(m_invite)(int module_unload)
return MOD_SUCCESS;
}
/* Send the user his/her list of active invites */
int send_invite_list(aClient *sptr)
{
Link *inv;
for (inv = sptr->user->invited; inv; inv = inv->next)
{
sendto_one(sptr, rpl_str(RPL_INVITELIST), me.name, sptr->name,
inv->value.chptr->chname);
}
sendto_one(sptr, rpl_str(RPL_ENDOFINVITELIST), me.name, sptr->name);
return 0;
}
/*
** m_invite
** parv[0] - sender prefix
@@ -92,7 +106,9 @@ DLLFUNC CMD_FUNC(m_invite)
aChannel *chptr;
short over = 0;
if (parc < 3 || *parv[1] == '\0')
if (parc == 1)
return send_invite_list(sptr);
else if (parc < 3 || *parv[1] == '\0')
{
sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS),
me.name, parv[0], "INVITE");
+5 -5
View File
@@ -331,7 +331,7 @@ static char *replies[] = {
/* 295 RPL_HELPIGN */ ":%s 295 %s :Your address has been ignored from forwarding",
/* 296 */ NULL, /* aircd */
/* 297 */ NULL,
/* 298 */ NULL,
/* 298 */ NULL, /* Used */
/* 299 */ NULL, /* aircd */
/* 300 */ NULL, /* rfc1459 */
/* 301 RPL_AWAY */ ":%s 301 %s %s :%s",
@@ -373,8 +373,8 @@ static char *replies[] = {
/* 333 RPL_TOPICWHOTIME */ ":%s 333 %s %s %s %lu",
/* 334 RPL_LISTSYNTAX */ ":%s 334 %s :%s",
/* 335 RPL_WHOISBOT */ ":%s 335 %s %s :is a \2Bot\2 on %s",
/* 336 */ NULL,
/* 337 */ NULL,
/* 336 RPL_INVITELIST */ ":%s 336 %s :%s",
/* 337 RPL_ENDOFINVITELIST */ ":%s 337 %s :End of /INVITE list.",
/* 338 */ NULL, /* ircu, bahamut */
/* 339 */ NULL, /* Used */
/* 340 RPL_USERIP */ ":%s 340 %s :%s %s %s %s %s",
@@ -383,8 +383,8 @@ static char *replies[] = {
/* 343 */ NULL,
/* 344 */ NULL,
/* 345 */ NULL, /* gamesurge */
/* 346 RPL_INVITELIST */ ":%s 346 %s %s %s",
/* 347 RPL_ENDOFINVITELIST */ ":%s 347 %s %s :End of Channel Invite List",
/* 346 RPL_INVEXLIST */ ":%s 346 %s %s %s",
/* 347 RPL_ENDOFINVEXLIST */ ":%s 347 %s %s :End of Channel Invite List",
/* 348 RPL_EXLIST */ ":%s 348 %s %s %s %s %lu",
/* 349 RPL_ENDOFEXLIST */ ":%s 349 %s %s :End of Channel Exception List",
/* 350 */ NULL,