Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2. class CZncBot : public CModule {
  3. public:
  4. MODCONSTRUCTOR(CZncBot) {}
  5.  
  6. string authname;
  7.  
  8. virtual EModRet OnChanMsg(CNick& Nick, CChan& Channel, CString& sMessage) {
  9.  
  10. PutIRC("WHO " + Nick.GetNick() + " %a");
  11.  
  12. if (authname != "multihunter") {
  13. PutIRC("NOTICE " + Nick.GetNick() + " :Only multihunter can use this bot.");
  14. return CONTINUE;
  15. }
  16.  
  17. return CONTINUE;
  18. }
  19.  
  20.  
  21. virtual EModRet OnRaw (CString &sLine) {
  22. if (sLine.Token(1) == "354") {
  23. authname = sLine.Token(3);
  24. }
  25. return CONTINUE;
  26. }
  27.  
  28.  
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement