Code: Select all
bind pub -|- "!global" PubGlobal
setudef flag staff
proc PubGlobal {nick host hand chan text} {
if {[channel get $chan staff]} {
if {$text == ""} {
puthelp "PRIVMSG $chan :\002FOUT:\002 Gelieve een global op te geven."
} else {
puthelp "PRIVMSG #twor :\002GLOBAL:\002 \[ \00307$nick\00301 \] $text"
puthelp "PRIVMSG #tworSTAFF :\002GLOBAL:\002 \[ \00307$nick\00301 \] $text"
puthelp "PRIVMSG #tworPA :\002GLOBAL:\002 \[ \00307$nick\00301 \] $text"
putloglev p "#twor" "<TWOR_LOG> \002GLOBAL:\002 \[ \00307$nick\00301 \] $text"
return 1
}
}
}
Something like this:
!setperson My Name
!pglobal Tekst
GLOBAL: [ My Name ] Tekst
Code: Select all
bind pub -|- "!setperson" PubPerson
setudef flag staff
proc PubPerson {nick host hand chan text} {
if {[channel get $chan staff]} {
if {$text == ""} {
puthelp "PRIVMSG $chan :\002FOUT:\002 Gelieve een naam op te geven."
} else {
puthelp "PRIVMSG $chan :\002NEW PERSON:\002 $text"
set person $text
return 1
}
}
}
bind pub -|- "!pglobal" PubpGlobal
setudef flag staff
proc PubpGlobal {nick host hand chan text} {
if {[channel get $chan staff]} {
if {$text == ""} {
puthelp "PRIVMSG $chan :\002FOUT:\002 Gelieve een p-global op te geven."
} else {
puthelp "PRIVMSG #tworSTAFF :\002GLOBAL:\002 \[ \00307$person\00301 \] $text"
putloglev p "#twor" "<TWOR_LOG> \002GLOBAL:\002 \[ \00307$person\00301 \] $text"
return 1
}
}
}