This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Something aint right.. help me

Old posts that have not been replied to for several years.
Locked
A
AtomicWedgie
Voice
Posts: 13
Joined: Wed May 04, 2005 8:30 am

Something aint right.. help me

Post by AtomicWedgie »

bind pub - "!add cs" my:proc

proc my:proc {nick uhost hand chan text} {
if {[string equal -nocase "game" [lindex $text 0]]} {
if {([lindex $text 1] != "") && ![file exists database\CS.txt]} {
set file [open database\CS.txt a]; puts $file "[lindex $text 1] $nick"
close $file
}
}
}
1) i cant see the cs.txt file in my windrop folder..
2) no message when trying to add.
3) i need help to script a !show CS that will PM the list to Asker.
and will the script i wrote above will add the player by name ? or by host ?
A
AtomicWedgie
Voice
Posts: 13
Joined: Wed May 04, 2005 8:30 am

Post by AtomicWedgie »

Code: Select all

bind pub - "!add cs" my:proc 

proc my:proc {nick uhost hand chan text} { 
 if {[string equal -nocase "game" [lindex $text 0]]} { 
  if {([lindex $text 1] != "") && ![file exists database\CS.txt]} { 
  set file [open database\CS.txt a]; puts $file "[lindex $text 1] $nick" 
  close $file 
  } 
 } 
} 

User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

bind pub - "!add cs" my:proc
you can't use pub with "!add cs"

you may want to change this to:

Code: Select all

bind pubm - "!add cs *" my:proc

proc my:proc {nick uhost hand chan text} { 
 if {[string equal -nocase "game" [lindex [split $text] 2]]} { 
  if {([lindex [split $text] 3] != "") && ![file exists database\CS.txt]} { 
   set file [open database\CS.txt a]; puts $file "[lindex [split $text] 3] $nick" 
   close $file 
  } 
 } 
}
A
AtomicWedgie
Voice
Posts: 13
Joined: Wed May 04, 2005 8:30 am

Post by AtomicWedgie »

2) no message when trying to add.


How do i do this ?
A
AtomicWedgie
Voice
Posts: 13
Joined: Wed May 04, 2005 8:30 am

Post by AtomicWedgie »

i want like !add cs
<bot> You have been added to CS list. Thank you for using this Service
A
AtomicWedgie
Voice
Posts: 13
Joined: Wed May 04, 2005 8:30 am

Post by AtomicWedgie »

Sir_Fz wrote:
bind pub - "!add cs" my:proc
you can't use pub with "!add cs"

you may want to change this to:

Code: Select all

bind pubm - "!add cs *" my:proc

proc my:proc {nick uhost hand chan text} { 
 if {[string equal -nocase "game" [lindex [split $text] 2]]} { 
  if {([lindex [split $text] 3] != "") && ![file exists database\CS.txt]} { 
   set file [open database\CS.txt a]; puts $file "[lindex [split $text] 3] $nick" 
   close $file 
  } 
 } 
}
That didnt work...
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

AtomicWedgie wrote:That didnt work...
"Doesn't work" is no error description! Tell what you are doing, tell what the bots reacts, check for TCL errors and best give the whole '.set errorInfo' output.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked