mirror of
https://github.com/anope/anope.git
synced 2026-06-25 02:46:37 +02:00
BUILD : 1.7.6 (521) BUGS : 254, 266 NOTES : Fixed up some alog() messages, and MemoServ INFO showing -1 for no hard limit
git-svn-id: svn://svn.anope.org/anope/trunk@521 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@375 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
bb9c7b1c7b
commit
6f72ea0278
@@ -16,6 +16,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004
|
||||
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/04 F Fixed up some alog() messages that were incorrect. [#266]
|
||||
01/01 F Ultimate3 channel modes, which had been defined incorrectly. [ #00]
|
||||
12/31 F Fixed integer overflow error with CS ACCESS/LEVELS. [#262]
|
||||
12/30 F Fixed moduleAddData using an old moduleData as list head. [#261]
|
||||
|
||||
+2
-3
@@ -2456,8 +2456,7 @@ static int do_say(User * u)
|
||||
ci->bi->lastmsg = time(NULL);
|
||||
if (logchan && LogBot)
|
||||
anope_cmd_privmsg(ci->bi->nick, LogChannel,
|
||||
":SAY %s %s %s", u->nick, ci->name,
|
||||
text);
|
||||
"SAY %s %s %s", u->nick, ci->name, text);
|
||||
} else {
|
||||
syntax_error(s_BotServ, u, "SAY", BOT_SAY_SYNTAX);
|
||||
}
|
||||
@@ -2492,7 +2491,7 @@ static int do_act(User * u)
|
||||
text, 1);
|
||||
ci->bi->lastmsg = time(NULL);
|
||||
if (logchan && LogBot)
|
||||
anope_cmd_privmsg(ci->bi->nick, LogChannel, ":ACT %s %s %s",
|
||||
anope_cmd_privmsg(ci->bi->nick, LogChannel, "ACT %s %s %s",
|
||||
u->nick, ci->name, text);
|
||||
}
|
||||
return MOD_CONT;
|
||||
|
||||
+8
-2
@@ -2855,13 +2855,18 @@ static int do_logout(User * u)
|
||||
if (u2) {
|
||||
make_unidentified(u2, ci);
|
||||
notice_lang(s_ChanServ, u, CHAN_LOGOUT_SUCCEEDED, nick, chan);
|
||||
alog("%s: User %s!%s@%s has been logged out of channel %s.",
|
||||
s_ChanServ, u2->nick, u2->username, common_get_vhost(u2),
|
||||
chan);
|
||||
} else {
|
||||
int i;
|
||||
for (i = 0; i < 1024; i++)
|
||||
for (u2 = userlist[i]; u2; u2 = u2->next)
|
||||
make_unidentified(u2, ci);
|
||||
notice_lang(s_ChanServ, u, CHAN_LOGOUT_ALL_SUCCEEDED, chan);
|
||||
alog("%s: All users identified have been logged out of channel %s.", s_ChanServ, chan);
|
||||
}
|
||||
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -5805,9 +5810,10 @@ static int do_cs_topic(User * u)
|
||||
c->topic_time = ci->last_topic_time;
|
||||
}
|
||||
|
||||
if (is_services_admin(u))
|
||||
if (is_services_admin(u) && !check_access(u, ci, CA_TOPIC))
|
||||
alog("%s: %s!%s@%s changed topic of %s as services admin.",
|
||||
s_ChanServ, u->nick, u->username, u->host, c->name);
|
||||
s_ChanServ, u->nick, u->username, common_get_vhost(u),
|
||||
c->name);
|
||||
if (ircd->join2set) {
|
||||
if (whosends(ci) == s_ChanServ) {
|
||||
anope_cmd_join(s_ChanServ, c->name, time(NULL));
|
||||
|
||||
+136
-33
@@ -62,8 +62,10 @@ void moduleAddMemoServCmds(void) {
|
||||
/*************************************************************************/
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* MemoServ initialization. */
|
||||
|
||||
/**
|
||||
* MemoServ initialization.
|
||||
* @return void
|
||||
*/
|
||||
void ms_init(void)
|
||||
{
|
||||
Command *cmd;
|
||||
@@ -75,12 +77,15 @@ void ms_init(void)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* memoserv: Main MemoServ routine.
|
||||
/**
|
||||
* memoserv: Main MemoServ routine.
|
||||
* Note that the User structure passed to the do_* routines will
|
||||
* always be valid (non-NULL) and will always have a valid
|
||||
* NickInfo pointer in the `ni' field.
|
||||
* @param u User Struct
|
||||
* @param buf Buffer containing the privmsg
|
||||
* @return void
|
||||
*/
|
||||
|
||||
void memoserv(User * u, char *buf)
|
||||
{
|
||||
char *cmd, *s;
|
||||
@@ -106,11 +111,13 @@ void memoserv(User * u, char *buf)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* check_memos: See if the given user has any unread memos, and send a
|
||||
/**
|
||||
* check_memos: See if the given user has any unread memos, and send a
|
||||
* NOTICE to that user if so (and if the appropriate flag is
|
||||
* set).
|
||||
* @param u User Struct
|
||||
* @return void
|
||||
*/
|
||||
|
||||
void check_memos(User * u)
|
||||
{
|
||||
NickCore *nc;
|
||||
@@ -161,11 +168,14 @@ void check_memos(User * u)
|
||||
/*********************** MemoServ private routines ***********************/
|
||||
/*************************************************************************/
|
||||
|
||||
/* Return the MemoInfo corresponding to the given nick or channel name.
|
||||
* Return in `ischan' 1 if the name was a channel name, else 0.
|
||||
* Return in `isforbid' 1 if the name is forbidden, else 0.
|
||||
/**
|
||||
* Return the MemoInfo corresponding to the given nick or channel name.
|
||||
* @param name Name to check
|
||||
* @param ischan - the result its a channel will be stored in here
|
||||
* @param isforbid - the result if its forbidden will be stored in here
|
||||
* @return `ischan' 1 if the name was a channel name, else 0.
|
||||
* @return `isforbid' 1 if the name is forbidden, else 0.
|
||||
*/
|
||||
|
||||
static MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid)
|
||||
{
|
||||
if (*name == '#') {
|
||||
@@ -207,8 +217,12 @@ static MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Delete a memo by number. Return 1 if the memo was found, else 0. */
|
||||
|
||||
/**
|
||||
* Delete a memo by number.
|
||||
* @param mi Memoinfo struct
|
||||
* @param num Memo number to delete
|
||||
* @return int 1 if the memo was found, else 0.
|
||||
*/
|
||||
static int delmemo(MemoInfo * mi, int num)
|
||||
{
|
||||
int i;
|
||||
@@ -238,8 +252,11 @@ static int delmemo(MemoInfo * mi, int num)
|
||||
/*********************** MemoServ command routines ***********************/
|
||||
/*************************************************************************/
|
||||
|
||||
/* Return a help message. */
|
||||
|
||||
/**
|
||||
* Return a help message.
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_help(User * u)
|
||||
{
|
||||
char *cmd = strtok(NULL, "");
|
||||
@@ -262,8 +279,11 @@ static int do_help(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Send a memo to a nick/channel. */
|
||||
|
||||
/**
|
||||
* Send a memo to a nick/channel.
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_send(User * u)
|
||||
{
|
||||
char *name = strtok(NULL, " ");
|
||||
@@ -273,17 +293,20 @@ static int do_send(User * u)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Split from do_send, this way we can easily send a memo from any point :)
|
||||
* u - sender User
|
||||
* name - target name
|
||||
* text - memo Text
|
||||
* z - output level,
|
||||
* Split from do_send, this way we can easily send a memo from any point
|
||||
* @param u User Struct
|
||||
* @param name Target of the memo
|
||||
* @param text Memo Text
|
||||
* @param z type see info
|
||||
* 0 - reply to user
|
||||
* 1 - silent
|
||||
* 2 - silent with no delay timer
|
||||
* 3 - reply to user and request read receipt
|
||||
**/
|
||||
* @return void
|
||||
*/
|
||||
void memo_send(User * u, char *name, char *text, int z)
|
||||
{
|
||||
int ischan;
|
||||
@@ -423,6 +446,11 @@ void memo_send(User * u, char *name, char *text, int z)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Cancel the memo
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_cancel(User * u)
|
||||
{
|
||||
int ischan;
|
||||
@@ -466,8 +494,16 @@ static int do_cancel(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Display a single memo entry, possibly printing the header first. */
|
||||
|
||||
/**
|
||||
* Display a single memo entry, possibly printing the header first.
|
||||
* @param u User Struct
|
||||
* @param int Memo index
|
||||
* @param mi MemoInfo Struct
|
||||
* @param send_header If we are to send the headers
|
||||
* @param new If we are listing new memos
|
||||
* @param chan Channel name
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int list_memo(User * u, int index, MemoInfo * mi, int *sent_header,
|
||||
int new, const char *chan)
|
||||
{
|
||||
@@ -501,6 +537,15 @@ static int list_memo(User * u, int index, MemoInfo * mi, int *sent_header,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* list memno callback function
|
||||
* @param u User Struct
|
||||
* @param int Memo number
|
||||
* @param va_list List of arguements
|
||||
* @return result form list_memo()
|
||||
*/
|
||||
static int list_memo_callback(User * u, int num, va_list args)
|
||||
{
|
||||
MemoInfo *mi = va_arg(args, MemoInfo *);
|
||||
@@ -517,8 +562,13 @@ static int list_memo_callback(User * u, int num, va_list args)
|
||||
}
|
||||
|
||||
|
||||
/* List the memos (if any) for the source nick or given channel. */
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* List the memos (if any) for the source nick or given channel.
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_list(User * u)
|
||||
{
|
||||
char *param = strtok(NULL, " "), *chan = NULL;
|
||||
@@ -587,8 +637,14 @@ static int do_list(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Send a single memo to the given user. */
|
||||
|
||||
/**
|
||||
* Read a memo
|
||||
* @param u User Struct
|
||||
* @param int Index number
|
||||
* @param mi MemoInfo struct
|
||||
* @param chan Channel Name
|
||||
* @return 1 on success, 0 if failed
|
||||
*/
|
||||
static int read_memo(User * u, int index, MemoInfo * mi, const char *chan)
|
||||
{
|
||||
Memo *m;
|
||||
@@ -619,6 +675,15 @@ static int read_memo(User * u, int index, MemoInfo * mi, const char *chan)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Read a memo callback function
|
||||
* @param u User Struct
|
||||
* @param int Index number
|
||||
* @param va_list variable arguements
|
||||
* @return result of read_memo()
|
||||
*/
|
||||
static int read_memo_callback(User * u, int num, va_list args)
|
||||
{
|
||||
MemoInfo *mi = va_arg(args, MemoInfo *);
|
||||
@@ -634,8 +699,13 @@ static int read_memo_callback(User * u, int num, va_list args)
|
||||
}
|
||||
|
||||
|
||||
/* Read memos. */
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Read memo command
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_read(User * u)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
@@ -714,8 +784,13 @@ static int do_read(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Delete a single memo from a MemoInfo. */
|
||||
|
||||
/**
|
||||
* Delete a single memo from a MemoInfo. callback function
|
||||
* @param u User Struct
|
||||
* @param int Number
|
||||
* @param va_list Variable Arguemtns
|
||||
* @return 1 if successful, 0 if it fails
|
||||
*/
|
||||
static int del_memo_callback(User * u, int num, va_list args)
|
||||
{
|
||||
MemoInfo *mi = va_arg(args, MemoInfo *);
|
||||
@@ -744,9 +819,13 @@ static int del_memo_callback(User * u, int num, va_list args)
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Delete memos. */
|
||||
|
||||
/**
|
||||
* Delete memos command.
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_del(User * u)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
@@ -849,6 +928,11 @@ static int do_del(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* MS SET command.
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_set(User * u)
|
||||
{
|
||||
char *cmd = strtok(NULL, " ");
|
||||
@@ -877,6 +961,13 @@ static int do_set(User * u)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* MS SET notify
|
||||
* @param u User Struct
|
||||
* @param mi MemoInfo Struct
|
||||
* @param param Parameter
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_set_notify(User * u, MemoInfo * mi, char *param)
|
||||
{
|
||||
if (stricmp(param, "ON") == 0) {
|
||||
@@ -911,6 +1002,13 @@ static int do_set_notify(User * u, MemoInfo * mi, char *param)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* MS SET limit
|
||||
* @param u User Struct
|
||||
* @param mi MemoInfo Struct
|
||||
* @param param Parameter
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_set_limit(User * u, MemoInfo * mi, char *param)
|
||||
{
|
||||
char *p1 = strtok(param, " ");
|
||||
@@ -1033,6 +1131,11 @@ static int do_set_limit(User * u, MemoInfo * mi, char *param)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* MS INFO
|
||||
* @param u User Struct
|
||||
* @return MOD_CONT
|
||||
*/
|
||||
static int do_info(User * u)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
@@ -1107,7 +1210,7 @@ static int do_info(User * u)
|
||||
notice_lang(s_MemoServ, u, MEMO_INFO_X_MEMOS_SOME_UNREAD,
|
||||
name, mi->memocount, count);
|
||||
}
|
||||
if (mi->memomax) {
|
||||
if (mi->memomax == 0) {
|
||||
if (hardmax)
|
||||
notice_lang(s_MemoServ, u, MEMO_INFO_X_HARD_LIMIT, name,
|
||||
mi->memomax);
|
||||
|
||||
+7
-4
@@ -3029,10 +3029,13 @@ static int do_set_email(User * u, NickCore * nc, char *param)
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
alog("%s: %s!%s@%s (e-mail: %s) changed its e-mail to %s.", s_NickServ,
|
||||
u->nick, u->username, common_get_vhost(u),
|
||||
(nc->email ? nc->email : "none"), (param ? param : "none"));
|
||||
|
||||
if (u->na && u->na->nc != nc && is_services_admin(u)) {
|
||||
alog("%s: %s!%s@%s used SET EMAIL as Services admin on %s (e-mail: %s)", s_NickServ, u->nick, u->username, common_get_vhost(u), nc->display, (nc->email ? nc->email : "none"));
|
||||
} else {
|
||||
alog("%s: %s!%s@%s (e-mail: %s) changed its e-mail to %s.",
|
||||
s_NickServ, u->nick, u->username, common_get_vhost(u),
|
||||
(nc->email ? nc->email : "none"), (param ? param : "none"));
|
||||
}
|
||||
if (nc->email)
|
||||
free(nc->email);
|
||||
|
||||
|
||||
@@ -2519,7 +2519,6 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires,
|
||||
const char *reason)
|
||||
{
|
||||
int deleted = 0, i;
|
||||
int x;
|
||||
SXLine *entry;
|
||||
User *u2, *next;
|
||||
char buf[BUFSIZE];
|
||||
@@ -2987,7 +2986,6 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires,
|
||||
const char *reason)
|
||||
{
|
||||
int deleted = 0, i;
|
||||
int x;
|
||||
User *u2, *next;
|
||||
SXLine *entry;
|
||||
char buf[BUFSIZE];
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="6"
|
||||
VERSION_BUILD="520"
|
||||
VERSION_BUILD="521"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.6 (521)
|
||||
# BUGS : 254, 266
|
||||
# NOTES : Fixed up some alog() messages, and MemoServ INFO showing -1 for no hard limit
|
||||
#
|
||||
# BUILD : 1.7.6 (520)
|
||||
# BUGS : 265
|
||||
# NOTES : Fixed a few issues with chanserv, botserv, symbiosis, and topics
|
||||
|
||||
Reference in New Issue
Block a user