[filled] How can i add !topic off
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

[filled] How can i add !topic off

Started by Bumbi, 09 April, 2007, 11:09:32

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bumbi

Hi
Sorry that dev is down for this great bot script.
I want to add !topic off into my script... so that i can clear the topic when i'm not running the topic changer.
Can anyone help me how I do to add ... !topic off ??

Best Regards
Bumbi

Fab78

for clear topic use -> "!topic  " (2 spaces after topic word) :)

Madman

open Gui_Commands.lua and find: Command["topic"] = function(user, data)
replace that line and everything down to Command["setop"] = function(user,data) with this code
Code: lua
Command["topic"] = function(user, data)
	local s,e,cmd,NewTopic = string.find(data, "%b<>%s+(%S+)%s+(.+)")
	if NewTopic then
		if NewTopic == "off" then
			SendToOps(Cfg.Bot_Name,Cvrt.P2[user.iProfile].." "..user.sName.. " cleared the topic")
			frmHub:SetHubTopic("")
		else
			SendToOps(Cfg.Bot_Name,Cvrt.P2[user.iProfile].." "..user.sName.." changed Hub's topic to: "..NewTopic)
			frmHub:SetHubTopic(NewTopic)
		end
	else
		user:SendMessage(Cfg.Bot_Name, "Current topic: "..frmHub:GetHubTopic())
	end
	return 1
end
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Bumbi

Thanks Madman for the quick respons  :D

Bumbi

Cêñoßy†ê

#4
Thx Madman, fix added to next and last updatepack from me.
Future of levi is what you make to it :P
Powered By Leviathan™ 2nd Generation v. 1.9

SMF spam blocked by CleanTalk