1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 20:23:13 +02:00

- Fix empty/nonexistent short MOTD being shown instead of the full MOTD on user registration. Thanks WakiMiko (#4011).

This commit is contained in:
binki
2011-03-14 19:03:41 +00:00
parent 938b591358
commit 34cab7caff
2 changed files with 11 additions and 11 deletions
+2
View File
@@ -2269,3 +2269,5 @@
you can use deny link { } blocks if you want to deny older versions than
this release.
- Fix documentation about channel mode +t and halfops, thanks warg (#4007).
- Fix empty/nonexistent short MOTD being shown instead of the full
MOTD on user registration. Thanks WakiMiko (#4011).
+9 -11
View File
@@ -909,26 +909,24 @@ int short_motd(aClient *sptr)
tld = Find_tld(sptr, userhost);
/*
Try different sources of short MOTDs, falling back to
the long MOTD.
* Try different sources of short MOTDs, falling back to the
* long MOTD.
*/
themotd = NULL;
if (tld)
themotd = &smotd;
if (tld && tld->smotd.lines)
themotd = &tld->smotd;
if (!themotd)
themotd = &smotd;
/* try long MOTDs */
if (!themotd)
if (!themotd->lines)
{
is_short = 0;
if (tld)
if (tld && tld->motd.lines)
themotd = &tld->motd;
else
themotd = &motd;
}
if (!themotd)
themotd = &motd;
if (!themotd)
if (!themotd->lines)
{
sendto_one(sptr, err_str(ERR_NOMOTD), me.name, sptr->name);
return 0;