mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-08 19:25:25 +01:00
Added set::channel-command-prefix
This commit is contained in:
parent
507559b6be
commit
9c713f7aa7
5 changed files with 21 additions and 3 deletions
2
Changes
2
Changes
|
@ -2234,3 +2234,5 @@ seen. gmtime warning still there
|
|||
- Fixed a few fdlist bugs in SVSMODE/SVS2MODE found by Aither.
|
||||
- IPv6: added warning if a ::ffff:a.b.c.d type addr doesn't work since this "feature"
|
||||
is disabled by default at newer *BSD versions. Also improved another warning.
|
||||
- Added set::channel-command-prefix to allow channel text which starts with specific characters
|
||||
to be sent to +d clients (for in channel commands).
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<font size="4"><a href="http://www.unrealircd.com">http://www.unrealircd.com</a></font><br>
|
||||
<font size="4">Version: 3.2</font><br>
|
||||
<b>Current Version:</b> 3.2 Beta17<br>
|
||||
<b>Last doc update:</b> 2003-06-15 </div>
|
||||
<b>Last doc update:</b> 2003-06-22 </div>
|
||||
<b>Head Coders:</b> Stskeeps / codemastr / Luke / McSkaf / Syzop<br>
|
||||
<b>Contributors:</b> Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk<br>
|
||||
<b>Documentation:</b> CKnight^ / Syzop<br>
|
||||
|
@ -1647,6 +1647,10 @@ set {
|
|||
specify * for users to be able to use no flags.</p>
|
||||
<p><font class="set">set::maxchannelsperuser <amount-of-channels>;</font><br>
|
||||
Specifies the number of channels a single user may be in at any one time.</p>
|
||||
<p><font class="set">set::channel-command-prefix <command-prefixes>;</font><br>
|
||||
Specifies the prefix characters for services "in channel commands". Messages starting with
|
||||
any of the specified characters will still be sent even if the client is +d. The default
|
||||
value is "`".</p>
|
||||
<p><font class="set">set::allow-userhost-change [never|always|not-on-channels|force-rejoin]</font><br>
|
||||
Specifies what happens when the user@host changes (+x/-x/chghost/chgident/setident/vhost/etc).<br>
|
||||
<i>never</i> disables all the commands, <i>always</i> does always allow it even when in channels
|
||||
|
|
|
@ -99,6 +99,7 @@ struct zConfiguration {
|
|||
enum UHAllowed userhost_allowed;
|
||||
char *restrict_usermodes;
|
||||
char *restrict_channelmodes;
|
||||
char *channel_command_prefix;
|
||||
long unknown_flood_bantime;
|
||||
long unknown_flood_amount;
|
||||
struct ChMode modes_on_join;
|
||||
|
@ -185,3 +186,4 @@ extern aConfiguration iConf;
|
|||
#define IDENT_READ_TIMEOUT iConf.ident_read_timeout
|
||||
|
||||
#define MKPASSWD_FOR_EVERYONE iConf.mkpasswd_for_everyone
|
||||
#define CHANCMDPFX iConf.channel_command_prefix
|
||||
|
|
|
@ -406,7 +406,10 @@ DLLFUNC int m_message(aClient *cptr, aClient *sptr, int parc, char *parv[], int
|
|||
chptr) == 1)
|
||||
continue;
|
||||
|
||||
sendanyways = (parv[2][0] == '`' ? 1 : 0);
|
||||
if (!CHANCMDPFX)
|
||||
sendanyways = (parv[2][0] == '`' ? 1 : 0);
|
||||
else
|
||||
sendanyways = (strchr(CHANCMDPFX,parv[2][0]) ? 1 : 0);
|
||||
text =
|
||||
(chptr->mode.mode & MODE_STRIP ?
|
||||
(char *)StripColors(parv[2]) : parv[2]);
|
||||
|
|
|
@ -1113,6 +1113,7 @@ void free_iConf(aConfiguration *i)
|
|||
ircfree(i->auto_join_chans);
|
||||
ircfree(i->oper_auto_join_chans);
|
||||
ircfree(i->oper_only_stats);
|
||||
ircfree(i->channel_command_prefix);
|
||||
ircfree(i->oper_snomask);
|
||||
ircfree(i->user_snomask);
|
||||
ircfree(i->egd_path);
|
||||
|
@ -2245,7 +2246,7 @@ void report_dynconf(aClient *sptr)
|
|||
}
|
||||
sendto_one(sptr, ":%s %i %s :anti-spam-quit-message-time: %s", me.name, RPL_TEXT,
|
||||
sptr->name, pretty_time_val(ANTI_SPAM_QUIT_MSG_TIME));
|
||||
sendto_one(sptr, ":%s %i %s :allow-userhost-change: %s", me.name, RPL_TEXT, sptr->name, uhallow);
|
||||
sendto_one(sptr, ":%s %i %s :channel-command-prefix: %s", me.name, RPL_TEXT, sptr->name, CHANCMDPFX ? CHANCMDPFX : "`");
|
||||
#ifdef USE_SSL
|
||||
sendto_one(sptr, ":%s %i %s :ssl::egd: %s", me.name, RPL_TEXT,
|
||||
sptr->name, EGD_PATH ? EGD_PATH : (USE_EGD ? "1" : "0"));
|
||||
|
@ -5067,6 +5068,9 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
|
|||
else
|
||||
tempiConf.userhost_allowed = UHALLOW_REJOIN;
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "channel-command-prefix")) {
|
||||
ircstrdup(tempiConf.channel_command_prefix, cep->ce_vardata);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "restrict-usermodes")) {
|
||||
int i;
|
||||
char *p = MyMalloc(strlen(cep->ce_vardata) + 1), *x = p;
|
||||
|
@ -5419,6 +5423,9 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
|
|||
else if (!strcmp(cep->ce_varname, "oper-auto-join")) {
|
||||
CheckNull(cep);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "channel-command-prefix")) {
|
||||
CheckNull(cep);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "allow-userhost-change")) {
|
||||
CheckNull(cep);
|
||||
if (stricmp(cep->ce_vardata, "always") &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue