]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services_account.cpp
Tidyup
[user/henk/code/inspircd.git] / src / modules / m_services_account.cpp
index 4b5ec5c869e5d16084eebda1a790a70900cee896..49ce777e2a35cb31ad13561e28b234806e4e5a9e 100644 (file)
@@ -24,6 +24,8 @@ using namespace std;
 
 /* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
 
+/** Channel mode +R - unidentified users cannot join
+ */
 class AChannel_R : public ModeHandler
 {
  public:
@@ -52,6 +54,8 @@ class AChannel_R : public ModeHandler
        }
 };
 
+/** User mode +R - unidentified users cannot message
+ */
 class AUser_R : public ModeHandler
 {
  public:
@@ -80,6 +84,8 @@ class AUser_R : public ModeHandler
        }
 };
 
+/** Channel mode +M - unidentified users cannot message channel
+ */
 class AChannel_M : public ModeHandler
 {
  public:
@@ -134,7 +140,7 @@ class ModuleServicesAccount : public Module
 
                if (account)
                {
-                       source->WriteServ("330 %s %s %s :is logged in as", source->nick, dest->nick, account->c_str());
+                       ServerInstance->SendWhoisLine(source, dest, 330, "%s %s %s :is logged in as", source->nick, dest->nick, account->c_str());
                }
        }
 
@@ -144,7 +150,7 @@ class ModuleServicesAccount : public Module
                List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnDecodeMetaData] = 1;
        }
 
-       virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status)
+       virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                std::string *account;
                user->GetExt("accountname", account);
@@ -186,12 +192,12 @@ class ModuleServicesAccount : public Module
                return 0;
        }
         
-       virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status)
+       virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
-               return OnUserPreMessage(user, dest, target_type, text, status);
+               return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
        }
         
-       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
        {
                std::string *account;
                user->GetExt("accountname", account);
@@ -315,7 +321,7 @@ class ModuleServicesAccount : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0,VF_COMMON|VF_VENDOR);
+               return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
        }
 };