projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc8461e
)
Reject invalid durations in addnote.
author
ThiefMaster
<thiefmaster@gamesurge.net>
Sun, 20 May 2007 10:16:17 +0000
(12:16 +0200)
committer
Michael Poole
<mdpoole@troilus.org>
Mon, 28 May 2007 18:46:37 +0000
(14:46 -0400)
src/nickserv.c
patch
|
blob
|
history
diff --git
a/src/nickserv.c
b/src/nickserv.c
index 894c34badc74ba68de1d23c94652ffc41c176992..12aa5a9489697c095a204038988bfe4544356b3a 100644
(file)
--- a/
src/nickserv.c
+++ b/
src/nickserv.c
@@
-2786,7
+2786,13
@@
static NICKSERV_FUNC(cmd_addnote)
hi = get_victim_oper(user, argv[1]);
if (!hi)
return 0;
- duration = ParseInterval(argv[2]);
+ if(!strcmp(argv[2], "0"))
+ duration = 0;
+ else if(!(duration = ParseInterval(argv[2])))
+ {
+ reply("MSG_INVALID_DURATION", argv[2]);
+ return 0;
+ }
if (duration > 2*365*86400) {
reply("NSMSG_EXCESSIVE_DURATION", argv[2]);
return 0;