]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Added cycle_host_change option.
authorJD Horelick <redacted>
Wed, 24 Feb 2010 00:50:45 +0000 (19:50 -0500)
committerJD Horelick <redacted>
Wed, 24 Feb 2010 00:50:45 +0000 (19:50 -0500)
doc/example.conf
doc/reference.conf
include/s_conf.h
modules/m_info.c
src/newconf.c
src/s_conf.c
src/s_user.c

index 72186685c41bb52ddd87d37efc40a153ecae3369..a7417ffdb8e2a11597ce958a99c10deb97197535 100755 (executable)
@@ -347,6 +347,7 @@ channel {
        burst_topicwho = yes;
        kick_on_split_riding = no;
        only_ascii_channels = no;
+       cycle_host_change = yes;
        resv_forcepart = yes;
 };
 
index 8702c6e805c61842cbe9b8f6490da6089d3edf41..db409ecd4e0e55d1ae2bd957d9115c874e937605 100755 (executable)
@@ -761,6 +761,12 @@ channel {
         * or non-ASCII).
         */
        only_ascii_channels = no;
+
+       /* cycle_host_change: Should a user be cycled in the channels
+        * they're in when their host changes. If set to no, this may
+        * cause client desyncs.
+        */
+       cycle_host_change = yes;
  
        /* resv_forcepart: force any local users to part a channel
         * when a RESV is issued.
index 70c755c80e67e56ea4e475c7b11e3846b25c31a2..a31e098c2c4d3f70a2475ed805b500b3c58b28dc 100644 (file)
@@ -236,6 +236,7 @@ struct config_channel_entry
        int burst_topicwho;
        int kick_on_split_riding;
        int only_ascii_channels;
+       int cycle_host_change;
        int resv_forcepart;
 };
 
index d3ddb3b88bf5df161fab268f8882cb7633a24fd6..fb5632ef59e4f064db365aa76f0edadf70437ca3 100644 (file)
@@ -548,6 +548,12 @@ static struct InfoStruct info_table[] = {
                &ConfigChannel.only_ascii_channels,
                "Controls whether non-ASCII is disabled for JOIN"
        },
+       {
+               "cycle_host_change",
+               OUTPUT_BOOLEAN_YN,
+               &ConfigChannel.cycle_host_change,
+               "Controls if when a users' host changes, they cycle channels",
+       },
        {
                "use_except",
                OUTPUT_BOOLEAN_YN,
index 8b93cf89d83d574b6b2653a9d3ac64ba050d6694..df55304de86cde8afc3abfe2fc96595bdc8b096c 100644 (file)
@@ -2215,6 +2215,7 @@ static struct ConfEntry conf_channel_table[] =
        { "no_create_on_split", CF_YESNO, NULL, 0, &ConfigChannel.no_create_on_split    },
        { "no_join_on_split",   CF_YESNO, NULL, 0, &ConfigChannel.no_join_on_split      },
        { "only_ascii_channels", CF_YESNO, NULL, 0, &ConfigChannel.only_ascii_channels },
+       { "cycle_host_change",  CF_YESNO, NULL, 0, &ConfigChannel.cycle_host_change },
        { "use_except",         CF_YESNO, NULL, 0, &ConfigChannel.use_except            },
        { "use_invex",          CF_YESNO, NULL, 0, &ConfigChannel.use_invex             },
        { "use_knock",          CF_YESNO, NULL, 0, &ConfigChannel.use_knock             },
index 74eecc5b6ea329c2b6c46c8168f9b7ba0b548f41..0528d1db5ecb8494e783d186d01f650ed58462ce 100644 (file)
@@ -755,6 +755,7 @@ set_default_conf(void)
        ConfigChannel.max_bans = 25;
        ConfigChannel.max_bans_large = 500;
        ConfigChannel.only_ascii_channels = NO;
+       ConfigChannel.cycle_host_change = YES;
        ConfigChannel.burst_topicwho = NO;
        ConfigChannel.kick_on_split_riding = NO;
 
index 31e56aff317cfac04abd1a0db8911919e3d0eb90..441012c32f9a2adabe13f8f0886a1677a37a6253 100644 (file)
@@ -1435,7 +1435,7 @@ change_nick_user_host(struct Client *target_p,    const char *nick, const char *use
        struct membership *mscptr;
        int changed = irccmp(target_p->name, nick);
        int changed_case = strcmp(target_p->name, nick);
-       int do_qjm = irccmp(target_p->username, user) || irccmp(target_p->host, host);
+       int do_qjm = irccmp(target_p->username, user) || (irccmp(target_p->host, host) && ConfigChannel.cycle_host_change);
        char mode[10], modeval[NICKLEN * 2 + 2], reason[256], *mptr;
        va_list ap;