fix CHANS SET command to correctly find channel

This commit is contained in:
DNB 2005-04-02 15:33:15 +00:00
parent 2c6c2f0280
commit b2cc077893
3 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,8 @@
LogServ ChangeLog
=============================================================================
- Fix "CHANS SET #chan URL" command check for correct channel name (D)
1.2 * Mark * 17/2/2003
- We now try to read nick, user, host and realname so these can be configured more
easily (M)

View file

@ -42,7 +42,7 @@ const char *lgs_help_chan[] = {
"Syntax: \2CHANS \37ADD <Channame> <\"public\"/\"private\"> <url>\37\2",
" \2CHANS \37DEL <Channame>\37\2",
" \2CHANS \37LIST\37\2",
" \2CHANS \37SET URL <url>\37\2",
" \2CHANS \37SET <Channame> URL <url>\37\2",
"",
"Provides Logging Services for Channels on the network",
"\2ADD\2 Adds a channel to LogServ for Monitoring. You must specify:",

View file

@ -580,7 +580,7 @@ static int lgs_chans(User * u, char **av, int ac) {
prefmsg(u->nick, s_LogServ, "/msg %s HELP CHANS for more information", s_LogServ);
return NS_FAILURE;
}
hn = hash_lookup(lgschans, av[4]);
hn = hash_lookup(lgschans, av[3]);
if (hn) {
cl = hnode_get(hn);
} else {
@ -591,7 +591,7 @@ static int lgs_chans(User * u, char **av, int ac) {
prefmsg(u->nick, s_LogServ, "Can not find Channel %s in Logging System", av[3]);
return NS_FAILURE;
}
if (!strcasecmp(av[3], "URL")) {
if (!strcasecmp(av[4], "URL")) {
ircsnprintf(cl->statsurl, MAXPATH, "%s", av[5]);
prefmsg(u->nick, s_LogServ, "Changed URL for %s to: %s", cl->channame, cl->statsurl);
chanalert(s_LogServ, "%s changed the URL for %s to: %s", u->nick, cl->channame, cl->statsurl);