egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ZNC Nickserv.ccp Module..

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Shell & Bouncer Help
View previous topic :: View next topic  
Author Message
Geo
Voice


Joined: 06 Feb 2010
Posts: 16
Location: GEORGIA,EUROPE

PostPosted: Sat Feb 06, 2010 4:39 am    Post subject: ZNC Nickserv.ccp Module.. Reply with quote

I hope you All know about ZNC bouncer..
The Problem Is That when im using Auto Identify ( Nickserv module ) There is Error When its trying to identify to nickserv ( i mean DALNET Services.. ) Here we go:
-NickServ- Your nick will be changed in 60 seconds if you do not comply.
-
-NickServ- Error! "/msg NickServ" is no longer supported. Use "/msg nickserv@services.dal.net" or "/nickserv" instead.
-
I Got Problem and Changed The Nickserv.cpp. here is the line Which I Changed:
Code:

&& sMessage.AsUpper().find("IDENTIFY") != CString::npos
            && sMessage.find("help") == CString::npos) {
         PutIRC("PRIVMSG nickserv :IDENTIFY " + m_sPass);

And I change The " nickserv " with " nickserv@services.dal.net " . here its..
Code:

 && sMessage.AsUpper().find("IDENTIFY") != CString::npos
            && sMessage.find("help") == CString::npos) {
         PutIRC("PRIVMSG nickserv@services.dal.net :IDENTIFY " + m_sPass);

I killed The Process and Started again but it gave me the same error.. ( - Error! "/msg NickServ" )
Does Anyone has whats the clue of it?? Arrow
_________________
The World OWES Me.. So F*ck You Wink
Back to top
View user's profile Send private message
Geo
Voice


Joined: 06 Feb 2010
Posts: 16
Location: GEORGIA,EUROPE

PostPosted: Sat Feb 06, 2010 4:49 am    Post subject: Reply with quote

Oh and Here iS The nickserv.cpp

Code:

/*
 * Copyright (C) 2004-2009  See the AUTHORS file for details.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation.
 */

#include "User.h"

class CNickServ : public CModule
{
public:
   MODCONSTRUCTOR(CNickServ)
   {
   }

   virtual ~CNickServ()
   {
   }

   virtual bool OnLoad(const CString& sArgs, CString& sMessage)
   {
      if (sArgs.empty())
         m_sPass = GetNV("Password");
      else
         m_sPass = sArgs;

      return true;
   }

   virtual void OnModCommand(const CString& sCommand)
   {
      CString sCmdName = sCommand.Token(0).AsLower();
      if (sCmdName == "set") {
         CString sPass = sCommand.Token(1, true);
         m_sPass = sPass;
         SetNV("Password", m_sPass);
         PutModule("Password set");
      } else if (sCmdName == "clear") {
         m_sPass = "";
         DelNV("Password");
      } else {
         PutModule("Commands: set <password>, clear");
      }
   }

   void HandleMessage(CNick& Nick, const CString& sMessage)
   {
      if (!m_sPass.empty()
            && Nick.GetNick().Equals("nickserv@services.dal.net")
            && (sMessage.find("msg") != CString::npos
             || sMessage.find("authenticate") != CString::npos)
            && sMessage.AsUpper().find("IDENTIFY") != CString::npos
            && sMessage.find("help") == CString::npos) {
         PutIRC("PRIVMSG nickserv@services.dal.net :IDENTIFY " + m_sPass);
      }
   }

   virtual EModRet OnPrivMsg(CNick& Nick, CString& sMessage)
   {
      HandleMessage(Nick, sMessage);
      return CONTINUE;
   }

   virtual EModRet OnPrivNotice(CNick& Nick, CString& sMessage)
   {
      HandleMessage(Nick, sMessage);
      return CONTINUE;
   }

private:
   CString   m_sPass;
};

MODULEDEFS(CNickServ, "Auths you with NickServ")

_________________
The World OWES Me.. So F*ck You Wink
Back to top
View user's profile Send private message
Geo
Voice


Joined: 06 Feb 2010
Posts: 16
Location: GEORGIA,EUROPE

PostPosted: Mon Feb 08, 2010 4:23 pm    Post subject: Reply with quote

FORUM IS DEAD! CLOSED!
_________________
The World OWES Me.. So F*ck You Wink
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2829

PostPosted: Tue Feb 09, 2010 7:36 pm    Post subject: Reply with quote

Did you remember to recompile the module?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Geo
Voice


Joined: 06 Feb 2010
Posts: 16
Location: GEORGIA,EUROPE

PostPosted: Thu Feb 11, 2010 4:54 am    Post subject: Reply with quote

Hinesty i didnt do it.. ill try nce idea.. but i thought it would work with restart also.. as its loaded all modules again but doesnt work
_________________
The World OWES Me.. So F*ck You Wink
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2829

PostPosted: Thu Feb 11, 2010 10:54 am    Post subject: Reply with quote

A .cpp file is a C++ sourcecode file. It needs to be compiled into a loadable object to be "runnable". I've hardly ever come across a software package that compiles it's own C/C++ modules on the fly - honestly, I would be surprised if ZNC would do that. Some of the reasons are that compiling C/C++ code is rather resource-intensive, and requires a suitable build environment (access to needed header files, external libraries, etc).

Simply restarting an application would only (re)load whatever object files are currently present on the filesystem - if you didn't recompile the module, the object file would still have the same old instructions...

A look at eggdrop and it's modules (given this is an eggdrop forum...):
There's no automated rebuild of modules. It's all done using the make-scripts in the source tree. Simply dropping some module source into the installation tree will not do anything.
Eggdrop modules depend heavily on static resources within the eggdrop binary. For a module to work reliably, it should really be linked against the very binary that will load it.
The source tree is not included when you perform the last step of the build/installation ("make install"), if you've removed the sources and later want to add a new module, you're pretty much back to square one.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Geo
Voice


Joined: 06 Feb 2010
Posts: 16
Location: GEORGIA,EUROPE

PostPosted: Fri Feb 12, 2010 12:29 pm    Post subject: Reply with quote

Oks i Got It.. and what do you think, is there any module, or is possible to create, to make ZNC user work on !commands.. Public commands i mean.. !join !part .. etc.. For example as psybnc .SCRIPT works.
Any IDEA?
_________________
The World OWES Me.. So F*ck You Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Shell & Bouncer Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber