I currently have an mirc bot, but i am trying to change everything over to eggdrop but i don't really understand the tcl scripting, i am learning though. On my mIRC bot i have a topic script, with two commands !topic and !status. !topic will change one part of the topic and !status changes the other. It looks like this:
I was wondering if there is anyway to do this in eggdrop. I have searched for hours and haven't came up with anything close. Any help would be muchly appreciated.
SL0RD wrote:I currently have an mirc bot, but i am trying to change everything over to eggdrop but i don't really understand the tcl scripting, i am learning though. On my mIRC bot i have a topic script, with two commands !topic and !status. !topic will change one part of the topic and !status changes the other. It looks like this:
I was wondering if there is anyway to do this in eggdrop. I have searched for hours and haven't came up with anything close. Any help would be muchly appreciated.
# Here are our on *:TEXT.... basically, we need bind which is equivilent to on. then we have the flags.. so if we want to restrict it to friends on the bot we would have f then we have what it triggers on.. so "!topic" then we have the alias name it will run. which is topic:proc
bind - "!topic" topic:proc
bind - "!status" status:proc
# Just set the two things to nothing atm.
set topic ""
set status ""
# Have our aliases.....
proc topic:proc { nick host hand chan text } {
global topic status
if {[$nick isop $chan]} {
set topic $text
putserv "TOPIC $chan :$text / SL0RD $status"
}
}
proc status:proc { nick host hand chan text } {
global status topic
if {[$nick isop $chan]} {
set status $text
putserv "TOPIC $chan :$topic / SL0RD $status"
}
}
# Here are our on *:TEXT.... basically, we need bind which is equivilent to on. then we have the flags.. so if we want to restrict it to friends on the bot we would have f then we have what it triggers on.. so "!topic" then we have the alias name it will run. which is topic:proc
bind pub m|m "!topic" topic:cmd
bind pub m|m "!status" status:cmd
# Have our aliases.....
proc topic:cmd { nick host hand chan text } {
global topic status
if {[$nick isop $chan]} {
set topic $text
putserv "TOPIC $chan :$text / SL0RD $status"
}
}
proc status:cmd { nick host hand chan text } {
global status topic
if {[$nick isop $chan]} {
set status $text
putserv "TOPIC $chan :$topic / SL0RD $status"
}
}
Now when i do "!topic testing" for example in the channel i get this error in the terminal that i am running the bot it (my nick on irc is SL0RD)
proc status:proc { nick host hand chan text } {
global status topic
if {[$nick isop $chan]} {
if {[$chan == <yourchan>]} {
set status $text
putserv "TOPIC $chan :$topic / SL0RD $status"
}
}