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.

$bnick command against !op :P

Old posts that have not been replied to for several years.
Locked
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

$bnick command against !op :P

Post by entrapmen »

hi i ve got X.tcl and bot respond to the !commands. :( i want the bot the respond $bnick command against !command

here is the code:

Code: Select all

bind pub -|- [string trim $dop(chanchar)]op dop:cop
.
.
at stormbot.tcl there is

Code: Select all

bind pub - $nick do_callcommand
.
but if i ll use dat code i have change all the tcl :\ isnt there an easy way to handle dat?

Waiting for all responds.
10x

(sorry for bad english & lame :oops: :oops: )
<@ll the world is about smiles and cries>
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

remove that tcl, and use a tcl which performs commands when you type botnick command.
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

Sir_Fz wrote:remove that tcl, and use a tcl which performs commands when you type botnick command.
haha yea sure :D i have to use that script but with the changes :lol: do i want much ? :evil: :evil:
<@ll the world is about smiles and cries>
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

how can we make these changes if we can't see the code ?
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

Sir_Fz wrote:how can we make these changes if we can't see the code ?
:oops: :oops: you are right

Code: Select all

set dop(chanchar) "*"

bind pub -|- [string trim $dop(chanchar)]op dop:cop
bind pub -|- [string trim $dop(chanchar)]chaninfo dop:cchaninfo
bla bla..

proc dop:cop {nick host hand chan arg} {
	global dop

	if {$dop(chancom) != 1} {
		return 0
	}
	if {$hand == "*"} {
		return 0
	}
	dop:op $nick $host $hand "$chan $arg"
}
I hope dat will be enough, i dun wanna flood here... Tx for your attention...
<@ll the world is about smiles and cries>
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Example:

Code: Select all

bind pub o ${nick} my:pub

proc my:pub {nick uhost hand chan text} {
  switch -- [strlwr [lindex $text 0]] {
    "op"  { #your op stuff here }
    default { # default stuff goes here }
  }
}
Once the game is over, the king and the pawn go back in the same box.
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

caesar wrote:Example:

Code: Select all

bind pub o ${nick} my:pub

proc my:pub {nick uhost hand chan text} {
  switch -- [strlwr [lindex $text 0]] {
    "op"  { #your op stuff here }
    default { # default stuff goes here }
  }
}
sorry about my lame but i think i couldnt fix something :-? :cry:
i have changed the code like dat:

Code: Select all

bind pub o ${nick} my:pub

proc my:pub {nick uhost hand chan text} {
  switch -- [strlwr [1index $text 0]] {
 "op" {puthelp "NOTICE $nick :[censored] mypub works" }
}
}
but when i add any other proc or bind it doesnt respond it. like:
under "op" {puthelp .....}
i have added

Code: Select all

 "voice" {puthelp "NOTICE $nick :[censored] it works again" } 


so after dat i try to make another bind with same way but it doesnt respond to my commands. :oops: :oops: i think its my fault but couldnt find where am i wrong. Thanx for advices...
<@ll the world is about smiles and cries>
Locked