PtokaX forum

Archive => Leviathan => AllInOne Scripts => Archived 5.1 boards => Leviathan - Requests => Topic started by: Bumbi on 09 April, 2007, 11:09:32

Title: [filled] How can i add !topic off
Post by: Bumbi on 09 April, 2007, 11:09:32
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
Title: Re: How can i add !topic off
Post by: Fab78 on 09 April, 2007, 12:21:00
for clear topic use -> "!topic  " (2 spaces after topic word) :)
Title: Re: How can i add !topic off
Post by: Madman on 09 April, 2007, 14:58:38
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) Select

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
Title: Re: How can i add !topic off
Post by: Bumbi on 09 April, 2007, 16:57:10
Thanks Madman for the quick respons  :D

Bumbi
Title: Re: How can i add !topic off
Post by: Cêñoßy†ê on 09 April, 2007, 20:14:15
Thx Madman, fix added to next and last updatepack from me.
Future of levi is what you make to it :P