To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Difference between revisions of "Broadcastquery/code"

From ZNC
Jump to: navigation, search
(Restored code from internet-cached version stored at webarchive.org)
 
(restored from archive.org)
 
Line 24: Line 24:
  
 
GLOBALMODULEDEFS(CBroadcastQuery, "Sends all broadcasts as queries, instead of notices")</pre>
 
GLOBALMODULEDEFS(CBroadcastQuery, "Sends all broadcasts as queries, instead of notices")</pre>
 +
[[Category:Modules/Code]]

Latest revision as of 21:24, 3 April 2017

/*
 * Copyright (C) 2010  Brian Campbell "BrianC"
 *
 * 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"
#include "Modules.h"

class CBroadcastQuery : public CGlobalModule {
public:
	GLOBALMODCONSTRUCTOR(CBroadcastQuery) {}

	virtual EModRet OnBroadcast(CString &sMessage) {
		CString sModName = "broadcast";

		m_pUser->PutModule(sModName, sMessage);

		return HALTCORE;
	}
};

GLOBALMODULEDEFS(CBroadcastQuery, "Sends all broadcasts as queries, instead of notices")