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.

how would i do this with tcl??

Old posts that have not been replied to for several years.
Locked
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

how would i do this with tcl??

Post by matt2kjones »

ok say for example, a user types !something

the bot would then reply, with data typed in a tcl file for !something

do u understand what i mean???

thanx
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

set something "you cant take my virginity"

bind pub - something pub:something
proc pub:something {nick host handle chan bla} {
  global something
  putmsg $chan $something
}
says "you cant take my virginity" in the chan if someone types something (as first word on a line).
photon?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

hey thanx!

what do i replace nick and handle with???
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

you dont.

the nick/handle of the person triggering the bind will be passed on to the procedure automatically
photon?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

ok thanx, so what do i change on there so if someone types !info it will display the text???

what do i replace?

thanx
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

bind pub <flags> <command> <proc>
procname <nick> <user@host> <handle> <channel> <text>


bind pub - something pub:something

"something" is the command. if you want !info to be the command, then replace something with !info.
photon?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

im sure you could have guessed that though :)
photon?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

ok is this right then.......

set something "Test Writting"

bind pub - something pub:!test
proc pub:something {nick host handle chan bla} {
global something
putmsg $chan $something
}
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

no.

bind pub <flags> <command> <proc>

please guess again
photon?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

hey sorry

im a complete newbie at tcl

i have got it now and it works awsome!!!!

thanx

one thing, what would i change putmsg $chan $text to so that it goes to just that user not the whole channel???

thanx
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

putmsg $nick $something

if you want it to notice instead of privmsg

putnotc $nick $something
photon?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

cheers thats great!!!!
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
Locked