23 Log() <<
"IRC2SQL: no database connection to " << engine;
51 for (User::ChanUserList::const_iterator cit = u->
chans.begin(), cit_end = u->
chans.end(); cit != cit_end; ++cit)
62 query =
"INSERT DELAYED INTO `" +
prefix +
"server` (name, hops, comment, link_time, online, ulined) "
63 "VALUES (@name@, @hops@, @comment@, now(), 'Y', @ulined@) "
64 "ON DUPLICATE KEY UPDATE name=VALUES(name), hops=VALUES(hops), comment=VALUES(comment), "
65 "link_time=VALUES(link_time), online=VALUES(online), ulined=(ulined)";
91 query =
"CALL " +
prefix +
"UserConnect(@nick@,@host@,@vhost@,@chost@,@realname@,@ip@,@ident@,@vident@,"
92 "@account@,@secure@,@fingerprint@,@signon@,@server@,@uuid@,@modes@,@oper@)";
128 query =
"UPDATE `" +
prefix +
"user` SET nick=@newnick@ WHERE nick=@oldnick@";
136 query =
"UPDATE `" +
prefix +
"user` SET secure=@secure@, fingerprint=@fingerprint@ WHERE nick=@nick@";
145 query =
"UPDATE `" +
prefix +
"user` SET modes=@modes@, oper=@oper@ WHERE nick=@nick@";
159 query =
"UPDATE `" +
prefix +
"user` SET account=@account@ WHERE nick=@nick@";
182 query =
"INSERT INTO `" +
prefix +
"chan` (channel, topic, topicauthor, topictime, modes) "
183 "VALUES (@channel@,@topic@,@topicauthor@,@topictime@,@modes@) "
184 "ON DUPLICATE KEY UPDATE channel=VALUES(channel), topic=VALUES(topic),"
185 "topicauthor=VALUES(topicauthor), topictime=VALUES(topictime), modes=VALUES(modes)";
196 query =
"DELETE FROM `" +
prefix +
"chan` WHERE channel=@channel@";
208 query =
"CALL " +
prefix +
"JoinUser(@nick@,@channel@,@modes@)";
217 query =
"UPDATE `" +
prefix +
"chan` SET modes=@modes@ WHERE channel=@channel@";
240 query =
"CALL " +
prefix +
"PartUser(@nick@,@channel@)";
249 "SET topic=@topic@, topicauthor=@author@, topictime=FROM_UNIXTIME(@time@) "
250 "WHERE channel=@channel@";
263 if (message[0] ==
'\1' && message[message.
length() - 1] ==
'\1')
267 if (u->
HasExt(
"CTCPVERSION"))
269 u->
Extend<
bool>(
"CTCPVERSION");
272 if (versionstr.empty())
275 "SET version=@version@ "
bool HasMode(const Anope::string &name) const
void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) anope_override
const ModeList & GetModes() const
const Anope::string & GetIdent() const
void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) anope_override
Anope::string fingerprint
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt,...)
Anope::string addr() const
void OnNewServer(Server *server) anope_override
void OnShutdown() anope_override
Anope::string topic_setter
T * Extend(const Anope::string &name, const T &what)
ChanUserContainer * FindChannel(Channel *c) const
EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override
bool equals_ci(const char *_str) const
void OnUserLogin(User *u) anope_override
void SetValue(const Anope::string &key, const T &value, bool escape=true)
Anope::string GetModes() const
void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) anope_override
void OnSetDisplayedHost(User *u) anope_override
string substr(size_type pos=0, size_type n=npos) const
void OnLeaveChannel(User *u, Channel *c) anope_override
void OnChannelDelete(Channel *c) anope_override
void OnJoinChannel(User *u, Channel *c) anope_override
ServiceReference< SQL::Provider > sql
CoreExport Anope::map< Server * > ByName
void OnChannelCreate(Channel *c) anope_override
const Anope::string & GetUID() const
const Anope::string & GetDisplayedHost() const
void OnServerQuit(Server *server) anope_override
const Anope::string & GetVIdent() const
CoreExport Anope::string NormalizeBuffer(const Anope::string &)
static Anope::map< std::pair< bool, Anope::string > > modes
void OnUserConnect(User *u, bool &exempt) anope_override
void OnNickLogout(User *u) anope_override
void OnUserQuit(User *u, const Anope::string &msg) anope_override
CoreExport IRCDProto * IRCD
CoreExport channel_map ChannelList
void OnFingerprint(User *u) anope_override
const Anope::string & GetDescription() const
const Anope::string & GetName() const
void RunQuery(const SQL::Query &q)
NickCore * Account() const
CoreExport user_map UserListByNick
const Anope::string & Modes() const
T Get(const Anope::string &tag)
void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override
void OnReload(Configuration::Conf *config) anope_override
static BotInfo * Find(const Anope::string &nick, bool nick_only=false)
bool HasExt(const Anope::string &name) const
void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) anope_override
EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override