egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with using setudef and if {[channel get

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Mon Nov 06, 2006 7:29 am    Post subject: Help with using setudef and if {[channel get Reply with quote

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
View user's profile Send private message Send e-mail
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 11:10 am    Post subject: Reply with quote

did you do

.chanset #channelname +nofriendcode
Back to top
View user's profile Send private message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Tue Nov 07, 2006 1:57 am    Post subject: Reply with quote

It still doesnt work yes I have done that.
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Nov 07, 2006 2:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber