diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules.h | 30 | ||||
| -rw-r--r-- | include/regchannel.h | 1 | ||||
| -rw-r--r-- | include/threadengine.h | 6 |
3 files changed, 33 insertions, 4 deletions
diff --git a/include/modules.h b/include/modules.h index 0a92caf74..3d1c2f828 100644 --- a/include/modules.h +++ b/include/modules.h @@ -447,6 +447,11 @@ class CoreExport Module : public Extensible */ virtual void OnBadWordDel(ChannelInfo *ci, BadWord *bw) { } + /** Called in findbot() + * @param nick The nick being looked up + */ + virtual void OnFindBot(const Anope::string &nick) { } + /** Called before a bot kicks a user * @param bi The bot sending the kick * @param c The channel the user is being kicked on @@ -816,6 +821,11 @@ class CoreExport Module : public Extensible */ virtual void OnChanInfo(User *u, ChannelInfo *ci, bool ShowHidden) { } + /** Called on cs_findchan() + * @param chname The name being looked up + */ + virtual void OnFindChan(const Anope::string &chname) { } + /** Called when a nick is dropped * @param nick The nick */ @@ -907,6 +917,18 @@ class CoreExport Module : public Extensible */ virtual void OnNickInfo(User *u, NickAlias *na, bool ShowHidden) { } + /** Called in findnick() + * Useful to modify the na returned by findnick() + * @param nick The nick being looked up + */ + virtual void OnFindNick(const Anope::string &nick) { } + + /** Called in findcore() + * Useful to modify the nc returned by findcore() + * @param nick The nick being looked up + */ + virtual void OnFindCore(const Anope::string &nick) { } + /** Called when we get informed about a users SSL fingerprint * when we call this, the fingerprint should already be stored in the user struct * @param u pointer to the user @@ -1046,17 +1068,17 @@ enum Implementation I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended, I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay, I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, - I_OnNickInfo, I_OnFingerprint, + I_OnNickInfo, I_OnFindNick, I_OnFindCore, /* ChanServ */ I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnPreChanExpire, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange, I_OnAccessDel, I_OnAccessClear, I_OnLevelChange, I_OnChanRegistered, I_OnChanUnsuspend, I_OnDelChan, I_OnChannelCreate, I_OnChannelDelete, I_OnAkickAdd, I_OnAkickDel, - I_OnChanInfo, + I_OnChanInfo, I_OnFindChan, /* BotServ */ I_OnBotJoin, I_OnBotKick, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnBotAssign, I_OnBotUnAssign, - I_OnUserKicked, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan, I_OnBadWordAdd, I_OnBadWordDel, + I_OnUserKicked, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan, I_OnBadWordAdd, I_OnBadWordDel, I_OnFindBot, /* HostServ */ I_OnSetVhost, I_OnDeleteVhost, @@ -1066,7 +1088,7 @@ enum Implementation /* Users */ I_OnPreUserConnect, I_OnUserConnect, I_OnUserNickChange, I_OnUserQuit, I_OnUserLogoff, I_OnPreJoinChannel, - I_OnJoinChannel, I_OnPrePartChannel, I_OnPartChannel, + I_OnJoinChannel, I_OnPrePartChannel, I_OnPartChannel, I_OnFingerprint, /* OperServ */ I_OnDefconLevel, I_OnAddAkill, I_OnDelAkill, I_OnExceptionAdd, I_OnExceptionDel, diff --git a/include/regchannel.h b/include/regchannel.h index d8cf64509..4be8a50aa 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -110,6 +110,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, Anope::string last_topic_setter; /* Setter */ time_t last_topic_time; /* Time */ + // These two should be using extensible Anope::string forbidby; Anope::string forbidreason; diff --git a/include/threadengine.h b/include/threadengine.h index 8df288cae..822774c6e 100644 --- a/include/threadengine.h +++ b/include/threadengine.h @@ -99,6 +99,12 @@ class CoreExport Mutex /** Unlock the mutex, it must be locked first */ void Unlock(); + + /** Attempt to lock the mutex, will return true on success and false on fail + * Does not block + * @return true or false + */ + bool TryLock(); }; class CoreExport Condition : public Mutex |
