projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c253a00
)
added revoke_mode_a setting
author
pk910
<philipp@zoelle1.de>
Tue, 7 Feb 2012 13:19:36 +0000
(14:19 +0100)
committer
pk910
<philipp@zoelle1.de>
Tue, 7 Feb 2012 13:19:36 +0000
(14:19 +0100)
src/chanserv.c
patch
|
blob
|
history
srvx.conf.example
patch
|
blob
|
history
diff --git
a/src/chanserv.c
b/src/chanserv.c
index 75122799b0d28a6e729cea46cbe3d51f9eb3652a..e06cf468053de91c6afa5030f2f17ffed0203299 100644
(file)
--- a/
src/chanserv.c
+++ b/
src/chanserv.c
@@
-58,6
+58,7
@@
#define KEY_MAX_USERINFO_LENGTH "max_userinfo_length"
#define KEY_GIVEOWNERSHIP_PERIOD "giveownership_timeout"
#define KEY_INVITED_INTERVAL "invite_timeout"
#define KEY_MAX_USERINFO_LENGTH "max_userinfo_length"
#define KEY_GIVEOWNERSHIP_PERIOD "giveownership_timeout"
#define KEY_INVITED_INTERVAL "invite_timeout"
+#define KEY_REVOKE_MODE_A "revoke_mode_a"
#define KEY_NEW_CHANNEL_AUTHED "new_channel_authed_join"
#define KEY_NEW_CHANNEL_UNAUTHED "new_channel_unauthed_join"
#define KEY_NEW_CHANNEL_MSG "new_channel_message"
#define KEY_NEW_CHANNEL_AUTHED "new_channel_authed_join"
#define KEY_NEW_CHANNEL_UNAUTHED "new_channel_unauthed_join"
#define KEY_NEW_CHANNEL_MSG "new_channel_message"
@@
-568,6
+569,8
@@
static struct
unsigned int max_chan_users;
unsigned int max_chan_bans;
unsigned int max_userinfo_length;
unsigned int max_chan_users;
unsigned int max_chan_bans;
unsigned int max_userinfo_length;
+
+ unsigned int revoke_mode_a;
struct string_list *set_shows;
struct string_list *eightball;
struct string_list *set_shows;
struct string_list *eightball;
@@
-1438,11
+1441,13
@@
unregister_channel(struct chanData *channel, const char *reason)
timeq_del(0, NULL, channel, TIMEQ_IGNORE_FUNC | TIMEQ_IGNORE_WHEN);
timeq_del(0, NULL, channel, TIMEQ_IGNORE_FUNC | TIMEQ_IGNORE_WHEN);
- if(off_channel > 0)
- {
- mod_chanmode_init(&change);
- change.modes_clear |= MODE_REGISTERED;
- mod_chanmode_announce(chanserv, channel->channel, &change);
+ if(off_channel > 0 || chanserv_conf.revoke_mode_a) {
+ mod_chanmode_init(&change);
+ if(off_channel > 0)
+ change.modes_clear |= MODE_REGISTERED;
+ if(chanserv_conf.revoke_mode_a)
+ change.modes_clear |= MODE_ACCESS;
+ mod_chanmode_announce(chanserv, channel->channel, &change);
}
while(channel->users)
}
while(channel->users)
@@
-7659,6
+7664,8
@@
chanserv_conf_read(void)
chanserv_conf.dnr_expire_frequency = str ? ParseInterval(str) : 3600;
str = database_get_data(conf_node, KEY_INVITED_INTERVAL, RECDB_QSTRING);
chanserv_conf.invited_timeout = str ? ParseInterval(str) : 600*2;
chanserv_conf.dnr_expire_frequency = str ? ParseInterval(str) : 3600;
str = database_get_data(conf_node, KEY_INVITED_INTERVAL, RECDB_QSTRING);
chanserv_conf.invited_timeout = str ? ParseInterval(str) : 600*2;
+ str = database_get_data(conf_node, KEY_REVOKE_MODE_A, RECDB_QSTRING);
+ chanserv_conf.revoke_mode_a = str ? atoi(str) : 1;
str = database_get_data(conf_node, KEY_NODELETE_LEVEL, RECDB_QSTRING);
chanserv_conf.nodelete_level = str ? atoi(str) : 1;
str = database_get_data(conf_node, KEY_MAX_CHAN_USERS, RECDB_QSTRING);
str = database_get_data(conf_node, KEY_NODELETE_LEVEL, RECDB_QSTRING);
chanserv_conf.nodelete_level = str ? atoi(str) : 1;
str = database_get_data(conf_node, KEY_MAX_CHAN_USERS, RECDB_QSTRING);
diff --git
a/srvx.conf.example
b/srvx.conf.example
index 331975133d9a93dcb109339ce1f95cbf8c11264f..83ffb71c00a44b5a64c8bacb210b0f1d5d79c18e 100644
(file)
--- a/
srvx.conf.example
+++ b/
srvx.conf.example
@@
-43,10
+43,10
@@
"services" {
"nickserv" {
"nick" "NickServ";
"services" {
"nickserv" {
"nick" "NickServ";
- // What user modes do you want this service to have? Please keep in
- // mind which ircd software you are using here, and that all of the
- // services need to be at least +o.
- // "modes" "+iok";
+
// What user modes do you want this service to have? Please keep in
+
// mind which ircd software you are using here, and that all of the
+
// services need to be at least +o.
+
// "modes" "+iok";
// If you want to by have *@* as the default hostmask for all
// new accounts, set default_hostmask. This is discouraged
// for security reasons.
// If you want to by have *@* as the default hostmask for all
// new accounts, set default_hostmask. This is discouraged
// for security reasons.
@@
-103,7
+103,7
@@
"uc_H" "800"; // .. and upper case H
"S" "999";
"b" "800";
"uc_H" "800"; // .. and upper case H
"S" "999";
"b" "800";
- "I" "800";
+
"I" "800";
};
// and for who can change epithets for staff
"set_epithet_level" "800";
};
// and for who can change epithets for staff
"set_epithet_level" "800";
@@
-143,10
+143,10
@@
"opserv" {
"nick" "OpServ";
"opserv" {
"nick" "OpServ";
- // What user modes do you want this service to have? Please keep in
- // mind which ircd software you are using here, and that all of the
- // services need to be at least +o.
- // "modes" "+iok";
+
// What user modes do you want this service to have? Please keep in
+
// mind which ircd software you are using here, and that all of the
+
// services need to be at least +o.
+
// "modes" "+iok";
// should use of this service be limited to global opers?
"privileged" "1";
// fullname for service
// should use of this service be limited to global opers?
"privileged" "1";
// fullname for service
@@
-200,19
+200,21
@@
// (This is changed relative srvx-1.0.x, which would use default
// unless you specified ".disabled".)
"nick" "ChanServ";
// (This is changed relative srvx-1.0.x, which would use default
// unless you specified ".disabled".)
"nick" "ChanServ";
- // What user modes do you want this service to have? Please keep in
- // mind which ircd software you are using here, and that all of the
- // services need to be at least +o.
- // "modes" "+iok";
+
// What user modes do you want this service to have? Please keep in
+
// mind which ircd software you are using here, and that all of the
+
// services need to be at least +o.
+
// "modes" "+iok";
// Does your ircd have off-channel services support? Does it have
// Does your ircd have off-channel services support? Does it have
- // a registered channel mode? Does it support services opping themselves?
+
// a registered channel mode? Does it support services opping themselves?
// Bahamut has these things; ircu2.10.11 does not.
// Bahamut has these things; ircu2.10.11 does not.
- // This setting takes three numerical values:
- // 0 = off
- // 1 = use a registered channel mode, have services op themselves
- // 2 = all of the above, and a channel setting to have ChanServ not
- // idle in the channel
+
// This setting takes three numerical values:
+
// 0 = off
+
// 1 = use a registered channel mode, have services op themselves
+
// 2 = all of the above, and a channel setting to have ChanServ not
+
// idle in the channel
"off_channel" "0";
"off_channel" "0";
+ // revoke channel mode +a on unregister?
+ "revoke_mode_a" "1";
// how long should a person be unseen before resending infoline?
"info_delay" "120";
// maximum greeting length
// how long should a person be unseen before resending infoline?
"info_delay" "120";
// maximum greeting length
@@
-270,10
+272,10
@@
"global" {
"nick" "Global";
"global" {
"nick" "Global";
- // What user modes do you want this service to have? Please keep in
- // mind which ircd software you are using here, and that all of the
- // services need to be at least +o.
- // "modes" "+iok";
+
// What user modes do you want this service to have? Please keep in
+
// mind which ircd software you are using here, and that all of the
+
// services need to be at least +o.
+
// "modes" "+iok";
// should users get community announcements by default or not?
"announcements_default" "on";
};
// should users get community announcements by default or not?
"announcements_default" "on";
};