diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | Changes.lang | 2 | ||||
-rw-r--r-- | lang/de.l | 3 | ||||
-rw-r--r-- | lang/en_us.l | 2 | ||||
-rw-r--r-- | lang/nl.l | 3 | ||||
-rw-r--r-- | src/memoserv.c | 8 | ||||
-rw-r--r-- | src/modules/hs_moo.c | 112 | ||||
-rw-r--r-- | version.log | 6 |
8 files changed, 32 insertions, 105 deletions
@@ -16,6 +16,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004/2005 11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00] 11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00] 11/18 A NSAddAccessOnReg to control access list on registration. [ #00] +01/06 F Possible crash using memoserv. [#269] 01/05 F Few updates to Dutch language file (nl.l). [ #00] 01/05 F BotServ's banning would trigger a TSMODE error on a capable IRCd. [ #00] 01/05 F Not resetting the topic on channel creation with KEEPTOPIC off. [#267] diff --git a/Changes.lang b/Changes.lang index 20a1aa9bc..3c134002c 100644 --- a/Changes.lang +++ b/Changes.lang @@ -1,7 +1,7 @@ Anope Version 1.7.7 ------------------- *** New Strings: - + MEMO_NO_RSEND_SELF NICK_REGISTERED_NO_MASK OPER_ADMIN_MOVED OPER_OPER_MOVED @@ -1792,6 +1792,9 @@ MEMO_MAIL_TEXT2 Du hast gerade eine neue Memo von %s erhalten. Dies ist Memo Nummer %d. MEMO_MAIL_TEXT3 Memo Text: +MEMO_NO_RSEND_SELF + Das Erhalten von Empfangsbestätigungen ist nur beim Senden + einer Memo an andere User möglich. ########################################################################### # diff --git a/lang/en_us.l b/lang/en_us.l index c716d50e2..916dc4d18 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -1784,6 +1784,8 @@ MEMO_CHECK_READ The last memo you sent to %s (sent on %s) has been read. MEMO_CHECK_NO_MEMO Nick %s doesn't have a memo from you. +MEMO_NO_RSEND_SELF + You can not request a receipt when sending a memo to yourself. ########################################################################### # @@ -1763,6 +1763,9 @@ MEMO_INFO_X_NOTIFY_RECEIVE %s wordt geinformeerd over nieuwe memo's wanneer deze arriveren. MEMO_INFO_X_NOTIFY_SIGNON %s wordt geinformeerd over nieuwe memo's wanneer je inlogt. +MEMO_NO_RSEND_SELF + Je kan geen ontvangstbevestiging aanvragen voor een + memo die je naar jezelf stuurt. ########################################################################### # diff --git a/src/memoserv.c b/src/memoserv.c index 3014eaa84..62b461ce0 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -1407,6 +1407,14 @@ static int do_rsend(User * u) char *name = strtok(NULL, " "); char *text = strtok(NULL, ""); int z = 3; + NickAlias *na; + + na = findnick(name); + + if (stricmp(na->nc->display, u->na->nc->display) == 0) { + notice_lang(s_MemoServ, u, MEMO_NO_RSEND_SELF); + return MOD_CONT; + } if (MSMemoReceipt == 1) { /* Services opers and above can use rsend */ diff --git a/src/modules/hs_moo.c b/src/modules/hs_moo.c index 04641e860..dbd38361e 100644 --- a/src/modules/hs_moo.c +++ b/src/modules/hs_moo.c @@ -1,115 +1,21 @@ /** - * This is an EXAMPLE module, which adds the "moo" command to HostServ - * - * This command does NOT do anything useful at all! - * - * Please visit http://modules.anope.org for useful modules! - * + * Simple module to remove the Topiclock flag from _all_ channels and then unload itsself. **/ #include "module.h" -#define AUTHOR "Anope" /* Set the Author for a modinfo reply */ -#define VERSION "1.1" /* Set the version for a modinfo reply */ - -int hs_moo_show(User * u); /* Function to use when a /hs moo command is recived */ -int test(int argc, char **argv); -void myHostServHelp(User *u); /* Function to display out help in a /hs help response */ -int myHostServMooHelp(User *u); /* Function to display help to _everyone_ when a /hs help moo is called*/ -int myHostServMooRegHelp(User *u); /* Function to display extra help to regular-users when a /hs help moo is called*/ -int myHostServMooOperHelp(User *u); /* Function to display extra help to opers when a /hs help moo is called*/ -int myHostServMooAdminHelp(User *u); /* Function to display extra help to admins when a /hs help moo is called*/ -int myHostServMooRootHelp(User *u); /* Function to display extra help to roors when a /hs help moo is called*/ +#define AUTHOR "Rob" /* Set the Author for a modinfo reply */ +#define VERSION "1.0" /* Set the version for a modinfo reply */ int AnopeInit(int argc, char **argv) /* This will be executed when the module is loaded */ { - Command *c; /* Pointer to a Command */ - int status = 0; /* the status of our new command */ - c = createCommand("moo", hs_moo_show, NULL, -1, -1, -1, -1, -1); /* Create a new command "moo" pointing to hs_moo */ - - moduleAddHelp(c,myHostServMooHelp); /* add help for all users to this command */ - moduleAddRegHelp(c,myHostServMooRegHelp); /* add extra regular-user only help to this command */ - moduleAddOperHelp(c,myHostServMooOperHelp); /* add extra oper only help to this command */ - moduleAddAdminHelp(c,myHostServMooAdminHelp); /* add extra admin only help to this command */ - moduleAddRootHelp(c,myHostServMooRootHelp); /* add extra root only help to this command */ - - moduleSetHostHelp(myHostServHelp); /* add us to the .hs help list */ - - status = moduleAddCommand(HOSTSERV, c, MOD_HEAD); /* Add the command to the HOSTSERV cmd table */ - - /* Check if we have any argv's */ - if(argc>0) { - /* we do, the first will be the nick of the person modload'ing us */ - /* or NULL if we were auto-loaded */ - if(argv[0]) { - alog("hs_moo was modloaded by: [%s]",argv[0]); - } else { - alog("hs_moo was automatically loaded by anope"); + int i; + ChannelInfo *ci; + for (i = 0; i < 256; i++) { + for (ci = chanlists[i]; ci; ci = ci->next) { + ci->flags &= ~CI_TOPICLOCK; + } } - } - alog("hs_moo.so: Add Command 'moo' Status: %d",status); /* Log the command being added */ - - moduleAddCallback("test",time(NULL)+dotime("15s"),test,0,NULL); /* set a call-back function to exec in 3 mins time */ - moduleDelCallback("test"); - moduleAddAuthor(AUTHOR); /* tell Anope about the author */ - moduleAddVersion(VERSION); /* Tell Anope about the verison */ - - if(status!=MOD_ERR_OK) { return MOD_STOP; - } - return MOD_CONT; -} - -int hs_moo_show(User * u) -{ - notice(s_HostServ, u->nick, "MOO! - This command was loaded via a module!"); /* Just notice the user */ - return MOD_STOP; /* MOD_STOP means we will NOT pass control back to other */ -} /* modules waiting to handle the /hs moo command! */ - -int test(int argc, char **argv) { - alog("CallBack from hs_moo with %d paramaters",argc); - return MOD_CONT; -} - - -/***************************************************************************************************************************************/ -/* The code below here shows various ways of dealing with the module help system */ -/***************************************************************************************************************************************/ - -void myHostServHelp(User *u) { - notice(s_HostServ,u->nick, " MOO Moo's at the user!"); /* this will appear in the help list */ -} - -int myHostServMooHelp(User *u) { - notice(s_HostServ,u->nick,"Syntax: Moo"); /* this will be sent to everyone who does /msg hostserv help moo */ - notice(s_HostServ,u->nick,"This command is an example provided"); - notice(s_HostServ,u->nick,"by the Anope development team."); - return MOD_CONT; /* allow any other module's with help for /hs moo to run */ -} - -int myHostServMooRootHelp(User *u) { /* this will only be sent to ROOTS ONLY who /msg hostserv moo */ - myHostServMooAdminHelp(u); /* this line lets us show roots the ADMIN help as well as the root help */ - notice(s_HostServ,u->nick,"Only roots will see this part of the help"); - return MOD_CONT; -} - -int myHostServMooAdminHelp(User *u) { /* this will only be sent to ADMINS ONLY who /msg hostserv moo */ - myHostServMooOperHelp(u); /* this line lets us show admins the OPER help as well as the admin help */ - notice(s_HostServ,u->nick,"Only admins will see this part of the help"); - notice(s_HostServ,u->nick,"why not visit us on www.anope.org ?"); - return MOD_CONT; -} - -int myHostServMooOperHelp(User *u) { /* this will only be sent to OPERS ONLY who /msg hostserv moo */ - notice(s_HostServ,u->nick,"Only opers will see this part of the help"); - notice(s_HostServ,u->nick,"for more help/support with modules"); - notice(s_HostServ,u->nick,"visit us on irc.anope.org #anope! :)"); - return MOD_CONT; -} - -int myHostServMooRegHelp(User *u) { /* this will only be sent to REGULAR USERS ONLY who /msg hostserv moo */ - notice(s_HostServ,u->nick,"Only non-opers will see this part of the help"); - notice(s_HostServ,u->nick,"as we've left it hidden from opers"); - return MOD_CONT; } /* EOF */ diff --git a/version.log b/version.log index b16dfa4c4..8058194d3 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="7" -VERSION_BUILD="526" +VERSION_BUILD="527" # $Log$ # +# BUILD : 1.7.7 (527) +# BUGS : 269 +# NOTES : You can no longer request a reciept when sending a memo to yourself. +# # BUILD : 1.7.7 (526) # NOTES : Anope 1.7.7 Release. # |