| View previous topic :: View next topic |
| Author |
Message |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Mon Nov 06, 2006 7:29 am Post subject: Help with using setudef and if {[channel get |
|
|
I tried doing
setudef flag nofriendcode
in this script
| Code: |
proc NintendoXG:code {nick uhost hand chan arg} {
global nxg
if {[channel get $chan nofriendcode]} {
putserv "NOTICE $nick :\002\037Error: This command is disabled for $chan\002\037"
return
}
## change this a bit...make sure we have 2 elements
if {[llength [split $arg]] != 2} {
putserv "NOTICE $nick :\002SYNTAX:\002 [string trim $nxg(char)]Help Code"; return
}
foreach {name game} [split $arg] {break}
set list [split [read [set fd [open $::nxg(gamefile) r]]] \n]; close $fd
if {![llength [set matches [lsearch -all -inline -glob $list [md5 [string tolower $name]]*]]]} {
putserv "NOTICE $nick :The user: $name couldn't be found in the NintendoXG Database."; return
}
foreach match $matches {
foreach {x gm code} $match {
if {[string equal -nocase $gm $game]} {
putserv "NOTICE $nick :--- $name's Friendcode ---"
putserv "NOTICE $nick :Game: $gm -- Code: $code"
}
}
}
}
|
But that isnt working _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 11:10 am Post subject: |
|
|
did you do
.chanset #channelname +nofriendcode |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Tue Nov 07, 2006 1:57 am Post subject: |
|
|
It still doesnt work yes I have done that. _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Nov 07, 2006 2:49 am Post subject: |
|
|
| Code: |
bind pub - .crap crapcode
setudef flag crapcode
proc crapcode {nick uhost hand chan arg} {
if {[channel get $chan crapcode]} {
putserv "NOTICE $nick :\002\037Error: This command is disabled for $chan\002\037"
return
}
}
| [dcc(bot)] .chanset #crapchan +crapcode
[bot(dcc)] Successfully set modes { +crapcode } on #crapchan.
/msg #crapchan .crap
[NOTICE: bot- Error: This command is disabled for #crapchan
Worked for me. |
|
| Back to top |
|
 |
|