From: brain Date: Sun, 12 Nov 2006 17:47:59 +0000 (+0000) Subject: Slight hax. When bursting a channel - in the fmode, if we dont have +n or +t set... X-Git-Tag: v2.0.23~6657 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=ee3bdd6e5d886a558285157de93d2cef312ee74a;p=user%2Fhenk%2Fcode%2Finspircd.git Slight hax. When bursting a channel - in the fmode, if we dont have +n or +t set this side, explicitly put -n or -t into the mode string. This is because the other side will ass-u-me +nt set because this is the default. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5719 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 28d84fcdc..ba4f208d0 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1927,6 +1927,25 @@ class TreeSocket : public InspSocket if (numusers) buffer.append(list).append("\r\n"); + /* Sorry for the hax. Because newly created channels assume +nt, + * if this channel doesnt have +nt, explicitly send -n and -t for the missing modes. + */ + bool inverted = false; + if (!c->IsModeSet('n')) + { + modes.append("-n"); + inverted = true; + } + if (!c->IsModeSet('t')) + { + modes.append("-t"); + inverted = true; + } + if (inverted) + { + modes.append("+"); + } + for (BanList::iterator b = c->bans.begin(); b != c->bans.end(); b++) { modes.append("b");