[X2serv-cvs] [CVS] Module x3: Change committed
Brought to you by:
sirvulcan
From: Alex S. <ru...@us...> - 2005-04-20 14:40:06
|
Committer : Alex Schumann <ru...@us...> CVSROOT : /cvsroot/x2serv Module : x3 Commit time: 2005-04-20 14:39:58 UTC Modified files: ChangeLog.X3 src/chanserv.help src/helpfile.c src/modcmd.c src/nickserv.c src/nickserv.help src/proto-p10.c Log message: see changelog ---------------------- diff included ---------------------- Index: x3/ChangeLog.X3 diff -u x3/ChangeLog.X3:1.19 x3/ChangeLog.X3:1.20 --- x3/ChangeLog.X3:1.19 Fri Apr 15 14:27:21 2005 +++ x3/ChangeLog.X3 Wed Apr 20 07:39:47 2005 @@ -1,6 +1,18 @@ /*********************************************************************** X3 ChangeLog +2005-04-20 Alex Schumann <ru...@af...> + + * src/proto-common.c: removing +d. needs to be a config option + or something. + + * src/nickserv.help: modified main help reply of authserv + + * src/nickserv.c: added title, epithet, and fakehost to oset listing + + * src/modcmd.c: fixed up auto-help & alias command handling. Needs + totally redesigned though. + 2005-04-15 Alex Schumann <ru...@af...> * src/proto-common.c: Temp fix for x3 not seeing -hv modes being set @@ -101,5 +113,5 @@ ***********************************************************************/ -#define CVS_VERSION "$Revision: 1.19 $" +#define CVS_VERSION "$Revision: 1.20 $" Index: x3/src/chanserv.help diff -u x3/src/chanserv.help:1.8 x3/src/chanserv.help:1.9 --- x3/src/chanserv.help:1.8 Sat Mar 19 17:11:35 2005 +++ x3/src/chanserv.help Wed Apr 20 07:39:48 2005 @@ -551,7 +551,8 @@ "NOTE: The NoAutoOp setting is equivalent to the !togop command in previous versions of X3.", "$uSee Also:$u set"); "USET INFO" ("/msg $C USET <#channel> INFO <info>", - "This command will set a user defined information message to be displayed when you join the channel. By setting the message to '*', you will clear your message.", + "This command will set a user defined information message to be displayed when you join the channel. Set to '*' to clear the message.", + "Note: to keep from being annoying, your info message only shows when you have been offline for more than a few minutes.", "$uSee Also:$u access"); "USERS" ("/msg $C USERS <#channel> [mask]", "Displays the userlist for the specified channel. If a mask is supplied, only users matching the mask will be shown.", Index: x3/src/helpfile.c diff -u x3/src/helpfile.c:1.7 x3/src/helpfile.c:1.8 --- x3/src/helpfile.c:1.7 Sat Mar 19 17:11:35 2005 +++ x3/src/helpfile.c Wed Apr 20 07:39:48 2005 @@ -801,9 +801,9 @@ } rec = dict_find(hf->db, "<missing>", NULL); if (!rec) - return send_message(dest, src, "MSG_TOPIC_UNKNOWN"); + return 0; /* send_message(dest, src, "MSG_TOPIC_UNKNOWN"); */ if (rec->type != RECDB_QSTRING) - return send_message(dest, src, "HFMSG_HELP_NOT_STRING"); + return 0; /* send_message(dest, src, "HFMSG_HELP_NOT_STRING"); */ return _send_help(dest, src, hf->expand, rec->d.qstring); } Index: x3/src/modcmd.c diff -u x3/src/modcmd.c:1.12 x3/src/modcmd.c:1.13 --- x3/src/modcmd.c:1.12 Thu Mar 17 22:19:43 2005 +++ x3/src/modcmd.c Wed Apr 20 07:39:48 2005 @@ -55,6 +55,7 @@ { "MCMSG_NO_CHANNEL_BEFORE", "You may not give a channel name before this command." }, { "MCMSG_NO_PLUS_CHANNEL", "You may not use a +channel with this command." }, { "MCMSG_COMMAND_ALIASES", "%s is an alias for: %s" }, +/* { "MCMSG_HELP_COMMAND_ALIAS_FOR", "$bALIAS FOR:$b %s" },*/ { "MCMSG_HELP_COMMAND_ALIAS", "$uAlias for:$u %s" }, { "MCMSG_COMMAND_BINDING", "%s is a binding of: %s" }, { "MCMSG_ALIAS_ERROR", "Error in alias expansion for %s; check the error log for details." }, @@ -773,7 +774,11 @@ * return send_help(user, bot, cmd->command->parent->helpfile, cmd->command->name); * TODO: We actually DO want to show the parent IF there is no other help. */ - r = send_help(user, bot, cmd->command->parent->helpfile, cmd->name); + r = send_help(user, bot, cmd->command->parent->helpfile, cmd->name); + if(cmd->command->name) + { + send_message(user, bot, "MCMSG_COMMAND_ALIASES", cmd->name, cmd->command->name); + } /* If it's an alias, show what it's an alias for. */ if (cmd->alias.used) { @@ -800,7 +805,20 @@ * return send_help(user, bot, cmd->command->parent->helpfile, cmd->command->name); * TODO: We actually DO want to show the parent IF there is no other help. */ + /* If it's an alias, show what it's an alias for. */ + if (cmd->alias.used) { + char alias_text[MAXLEN]; + unsplit_string((char**)cmd->alias.list, cmd->alias.used, alias_text); + send_message(user, bot, "MCMSG_COMMAND_ALIASES", cmd->name, cmd->command->name); + } r = send_help_brief(user, bot, cmd->command->parent->helpfile, cmd->name); + if(!r) { + if(cmd->command->name) + { + send_message(user, bot, "MCMSG_HELP_COMMAND_ALIAS", cmd->command->name); + r = send_help_brief(user, bot, cmd->command->parent->helpfile, cmd->command->name); + } + } return r; } Index: x3/src/nickserv.c diff -u x3/src/nickserv.c:1.21 x3/src/nickserv.c:1.22 --- x3/src/nickserv.c:1.21 Fri Apr 15 14:27:21 2005 +++ x3/src/nickserv.c Wed Apr 20 07:39:48 2005 @@ -110,7 +110,7 @@ #define NICKSERV_MIN_PARMS(N) do { \ if (argc < N) { \ reply("MSG_MISSING_PARAMS", argv[0]); \ - svccmd_send_help(user, nickserv, cmd); \ + svccmd_send_help_brief(user, nickserv, cmd); \ return 0; \ } } while (0) @@ -2286,7 +2286,8 @@ unsigned int i; char *set_display[] = { "INFO", "WIDTH", "TABLEWIDTH", "COLOR", "PRIVMSG", /* "STYLE", */ - "EMAIL", "ANNOUNCEMENTS", "MAXLOGINS", "LANGUAGE" + "EMAIL", "ANNOUNCEMENTS", "MAXLOGINS", "LANGUAGE", + "FAKEHOST", "TITLE", "EPITHET" }; send_message(user, nickserv, "NSMSG_SETTING_LIST"); @@ -2609,13 +2610,15 @@ static OPTION_FUNC(opt_epithet) { - if (!override) { - send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); - return 0; - } - if ((argc > 1) && oper_has_access(user, nickserv, nickserv_conf.set_epithet_level, 0)) { - char *epithet = unsplit_string(argv+1, argc-1, NULL); + char *epithet; + if (!override) { + send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); + return 0; + } + + epithet = unsplit_string(argv+1, argc-1, NULL); + if (hi->epithet) free(hi->epithet); if ((epithet[0] == '*') && !epithet[1]) @@ -2635,12 +2638,12 @@ { const char *title; - if (!override) { - send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); - return 0; - } - if ((argc > 1) && oper_has_access(user, nickserv, nickserv_conf.set_title_level, 0)) { + if (!override) { + send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); + return 0; + } + title = argv[1]; if (strchr(title, '.')) { send_message(user, nickserv, "NSMSG_TITLE_INVALID"); @@ -2675,12 +2678,12 @@ { const char *fake; - if (!override) { - send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); - return 0; - } - if ((argc > 1) && oper_has_access(user, nickserv, nickserv_conf.set_fakehost_level, 0)) { + if (!override) { + send_message(user, nickserv, "MSG_SETTING_PRIVILEGED", argv[0]); + return 0; + } + fake = argv[1]; if ((strlen(fake) > HOSTLEN) || (fake[0] == '.')) { send_message(user, nickserv, "NSMSG_FAKEHOST_INVALID", HOSTLEN); Index: x3/src/nickserv.help diff -u x3/src/nickserv.help:1.8 x3/src/nickserv.help:1.9 --- x3/src/nickserv.help:1.8 Fri Apr 15 14:27:21 2005 +++ x3/src/nickserv.help Wed Apr 20 07:39:48 2005 @@ -2,18 +2,20 @@ "/services/nickserv/disable_nicks" { "/services/nickserv/email_enabled" ( "=------------ $b$N Help$b -----------=", - " $b$N$b is an authentication service, ", - " intended to serve as a central ", - " authentication point for all other ", - " network services. $b$C$b, $b$O$b, and ", - " $b$G$b all depend on ", - " $b$N$b to verify that users are valid.", + " $b$N$b is an authentication service,", + " providing login identification for", + " the network. $N is how you 'log in'", + " to get access in channels registered", + " with $C, and its how ircops are known", + " to $O and $G.", " $b$b", " $b$N$b help categories:", " $bACCOUNT$b Account management.", - " $bEMAIL$b Email maintenance commands.", - " $bINFORMATION$b Other functions.", - " $bOPER$b $N commands for IRC Operators.", + " $bEMAIL$b Email based commands", + " such as recovering forgotten", + " passwords.", + " $bINFORMATION$b Informational functions.", + " $bOPER$b Commands for IRC Operators.", "$b$b", " $b$N is $uNOT$u a NickServ$b! ", " see $b/msg $N HELP NOT NICKSERV$b ", @@ -22,17 +24,17 @@ ); "!/services/nickserv/email_enabled" ( "=------------ $b$N Help$b -----------=", - " $b$N$b is an authentication service, ", - " intended to serve as a central ", - " authentication point for all other ", - " network services. $b$C$b, $b$O$b, and ", - " $b$G$b all depend on ", - " $b$N$b to verify that users are valid.", + " $b$N$b is an authentication service,", + " providing login identification for", + " the network. $N is how you 'log in'", + " to get access in channels registered", + " with $C, and its how ircops are known", + " to $O and $G.", " $b$b", " $b$N$b help categories:", " $bACCOUNT$b Account management.", - " $bINFORMATION$b Other functions.", - " $bOPER$b $N commands for IRC Operators.", + " $bINFORMATION$b Informational functions.", + " $bOPER$b Commands for IRC Operators.", "$b$b", " $b$N is $uNOT$u a NickServ$b! ", " see $b/msg $N HELP NOT NICKSERV$b ", @@ -122,7 +124,7 @@ "NOT NICKSERV" { "/services/nickserv/disable_nicks" ( "=------------ $bNOT NICKSERV$b ------------=", - " $N is $unot$u a NickServ. On AfterNET, ", + " $N is $unot$u a NickServ. On this network, ", " nicknames are not owned. $N allows ", " you to register a single account to ", " log in to all channels, seperate from ", @@ -382,7 +384,7 @@ "$bPASSWORD$b: Sets user's password.", "$bFLAGS$b: Changes account flags (SphHdscfn) for user (see $uaccount flags$u).", "$bLEVEL$b: Sets $O access level.", - "$bEPITHET$b: The description $C shows for the user's access.", + "$bEPITHET$b: The description shown for the user's access in /whois.", "$bTITLE$b: The title the user will get (in there hostname) when +x.", "$bFAKEHOST$b: The fake hostname the user will get when +x.", "..or anything $bset$b can change.", Index: x3/src/proto-p10.c diff -u x3/src/proto-p10.c:1.13 x3/src/proto-p10.c:1.14 --- x3/src/proto-p10.c:1.13 Sun Apr 3 22:31:43 2005 +++ x3/src/proto-p10.c Wed Apr 20 07:39:48 2005 @@ -1951,7 +1951,8 @@ if (!hostname) hostname = self->name; make_numeric(self, local_num, numeric); - return AddUser(self, nick, nick, hostname, modes ? modes : "+doik", numeric, desc, now, "AAAAAA"); + /* TODO: Make these modes part of the conf file */ + return AddUser(self, nick, nick, hostname, modes ? modes : "+oik", numeric, desc, now, "AAAAAA"); } struct userNode * ----------------------- End of diff ----------------------- |