]> jfr.im git - irc/evilnet/x3.git/commitdiff
Added extended_accounts x3.conf setting for compatability with stock undernet ircu
authorrubin <redacted>
Sat, 18 Mar 2006 00:04:32 +0000 (00:04 +0000)
committerrubin <redacted>
Sat, 18 Mar 2006 00:04:32 +0000 (00:04 +0000)
ChangeLog.X3
src/proto-p10.c
x3.conf.example

index a9194bcc586b3188a2ef6577233ccdbde0291cb4..bd6c1ce6b744ce4f95a0d33e7de99711b940d9b7 100644 (file)
@@ -1,6 +1,14 @@
 /***********************************************************************
  X3 ChangeLog
 
+2006-03-17  Alex Schumann  <rubin@afternet.org>
+
+       * src/proto-p10.c: Added conf setting for extended_accounts for
+       backward compatability with stock undernet ircd.
+
+       * x3.conf.example: Added conf setting for extended_accounts for
+           backward compatability with stock undernet ircd.
+
 2006-03-06  Alex Schumann  <rubin@afternet.org>
        
        * src/opserv.help: Added missing trace criteria to help, 
index 7268fbbb5de3d15e68de0c8ef99bf33e97bcf600..580cbc5e1f1a526960791ece1675926d8fe7706a 100644 (file)
@@ -306,6 +306,7 @@ static unsigned int num_notice_funcs;
 static struct dict *unbursted_channels;
 static char *his_servername;
 static char *his_servercomment;
+static int extended_accounts;
 
 static struct userNode *AddUser(struct server* uplink, const char *nick, const char *ident, const char *hostname, const char *modes, const char *numeric, const char *userinfo, time_t timestamp, const char *realip);
 
@@ -437,23 +438,24 @@ irc_user(struct userNode *user)
 void
 irc_rename(struct userNode *user, const char *new_handle)
 {
-    putsock("%s " P10_ACCOUNT " %s M %s", self->numeric, user->numeric, new_handle);
+    if(extended_accounts)
+        putsock("%s " P10_ACCOUNT " %s M %s", self->numeric, user->numeric, new_handle);
 }
 
 void
 irc_delete(struct userNode *user)
 {
-    putsock("%s " P10_ACCOUNT " %s U", self->numeric, user->numeric);
+    if(extended_accounts)
+        putsock("%s " P10_ACCOUNT " %s U", self->numeric, user->numeric);
 }
 
 void
 irc_account(struct userNode *user, const char *stamp, time_t timestamp)
 {
-    putsock("%s " P10_ACCOUNT " %s R %s %lu", self->numeric, user->numeric, stamp, timestamp); 
-
-    /*  Uncomment this, and comment above, for use on non-nefarious ircd such as undernet */
-    /* XXX: (sorry for being lame, someone who cares about undernet should make this a x3.conf setting) */
-    /* putsock("%s " P10_ACCOUNT " %s %s %lu", self->numeric, user->numeric, stamp, timestamp); */
+    if(extended_accounts)
+        putsock("%s " P10_ACCOUNT " %s R %s %lu", self->numeric, user->numeric, stamp, timestamp); 
+    else
+        putsock("%s " P10_ACCOUNT " %s %s %lu", self->numeric, user->numeric, stamp, timestamp);
 }
 
 void
@@ -1107,6 +1109,9 @@ static CMD_FUNC(cmd_account)
     user = GetUserN(argv[1]);
     if (!user)
         return 1; /* A QUIT probably passed the ACCOUNT. */
+
+    if(!extended_accounts) /* any need for this function without? */
+        return 1;
     
     if(!strcmp(argv[2],"C"))
     {
@@ -1656,6 +1661,8 @@ init_parse(void)
     char numer[COMBO_NUMERIC_LEN+1];
 
     /* read config items */
+    str = conf_get_data("server/extended_accounts", RECDB_QSTRING);
+    extended_accounts = str ? enabled_string(str) : 1;
     str = conf_get_data("server/ping_freq", RECDB_QSTRING);
     ping_freq = str ? ParseInterval(str) : 120;
     str = conf_get_data("server/ping_timeout", RECDB_QSTRING);
index 74cb7236c6bd95dd7b7c617d295406d2750a2bac..29aaf6274be6c1b30ee8ce0fb022ef8e070df312 100644 (file)
          "www.afternet.org", 
          "Support Staff <support@afternet.org>"
     );
+    /* extended_accounts -
+     * enable this for nefarious 0.4.x and higher. Sends 'AC R nick account'instead of
+     * 'AC nick account' and allows for renames etc. */
+    "extended_accounts" "1";
     /* the following two settings are for ircu's HEAD_IN_SAND features, and are equivelent to
      * the F: lines in ircu's ircd.conf. both can be disabled by commenting them out. */
     //"his_servername" "*.AfterNET.org"; // hidden server name, shown in remote /whois requests