summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-16 02:25:38 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-16 02:25:38 +0000
commitc6e3324b302aa9ef4cf6bdf002719d8bf2908a0b (patch)
treeaabd05d10c6252151fb452b0db428dd985d5a884 /src/chanserv.c
parent98aa38d800a85e4cd295f435424524bbf2f0a3b1 (diff)
Made many of the functions in IRCDProto accept the relative object pointers instea of char* everywhere, and updated TODO
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2706 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
-rw-r--r--src/chanserv.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index c85efc259..941925b1b 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -136,7 +136,8 @@ class ChanServTimer : public Timer
if (ci)
ci->UnsetFlag(CI_INHABIT);
- ircdproto->SendPart(findbot(Config.s_ChanServ), channel.c_str(), NULL);
+ if (ci->c)
+ ircdproto->SendPart(findbot(Config.s_ChanServ), ci->c, NULL);
}
};
@@ -722,7 +723,8 @@ int check_kick(User * user, const char *chan, time_t chants)
}
c->SetMode(NULL, CMODE_BAN, mask);
- ircdproto->SendKick(whosends(ci), chan, user->nick, "%s", reason);
+ if (c)
+ ircdproto->SendKick(whosends(ci), c, user, "%s", reason);
return 1;
}
@@ -793,11 +795,10 @@ void restore_topic(const char *chan)
c->SetMode(NULL, CMODE_OP, Config.s_ChanServ);
}
}
- ircdproto->SendTopic(whosends(ci), c->name, c->topic_setter,
- c->topic ? c->topic : "", c->topic_time);
+ ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic ? c->topic : "");
if (ircd->join2set) {
if (whosends(ci) == findbot(Config.s_ChanServ)) {
- ircdproto->SendPart(findbot(Config.s_ChanServ), c->name, NULL);
+ ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
}
}
}
@@ -856,12 +857,11 @@ int check_topiclock(Channel * c, time_t topic_time)
}
}
- ircdproto->SendTopic(whosends(ci), c->name, c->topic_setter,
- c->topic ? c->topic : "", c->topic_time);
+ ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic ? c->topic : "");
if (ircd->join2set) {
if (whosends(ci) == findbot(Config.s_ChanServ)) {
- ircdproto->SendPart(findbot(Config.s_ChanServ), c->ci->name, NULL);
+ ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
}
}
return 1;