This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ZNC Nickserv.ccp Module..

Help with usage of shell accounts and bouncers.
Post Reply
G
Geo
Voice
Posts: 16
Joined: Sat Feb 06, 2010 4:29 am
Location: GEORGIA,EUROPE

ZNC Nickserv.ccp Module..

Post by Geo »

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: Select all

&& 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: Select all

 && 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 ;)
G
Geo
Voice
Posts: 16
Joined: Sat Feb 06, 2010 4:29 am
Location: GEORGIA,EUROPE

Post by Geo »

Oh and Here iS The nickserv.cpp

Code: Select all

/*
 * 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 ;)
G
Geo
Voice
Posts: 16
Joined: Sat Feb 06, 2010 4:29 am
Location: GEORGIA,EUROPE

Post by Geo »

FORUM IS DEAD! CLOSED!
The World OWES Me.. So F*ck You ;)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Did you remember to recompile the module?
NML_375
G
Geo
Voice
Posts: 16
Joined: Sat Feb 06, 2010 4:29 am
Location: GEORGIA,EUROPE

Post by Geo »

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 ;)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
G
Geo
Voice
Posts: 16
Joined: Sat Feb 06, 2010 4:29 am
Location: GEORGIA,EUROPE

Post by Geo »

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 ;)
Post Reply