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.

!wb public command [SOLVED]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
h
holycrap
Op
Posts: 152
Joined: Mon Jan 21, 2008 11:19 pm

!wb public command [SOLVED]

Post by holycrap »

Hi,

I have a simple mIRC code below which does the following:

<holycrap> !wb test
<bot> Welcome back, test!

How do I go about doing this in TCL? I want to add more commands, for exe in the code below I can just copy and paste the entire block and change *wb* to something else and I have another command. Can someone show me how to do this in TCL?

Thank you! :D

Code: Select all

on *:text:*wb*:#: {
  if $1 == %c $+ wb {
    if $2 == $null { msg $chan 13Welcome Back $nick $+ ! | halt }
    else { msg $chan 13Welcome Back $2 $+ ! }
  }
}
Edit: Changed subject to be more relevant. (Sir_Fz)
Last edited by holycrap on Wed Jun 10, 2009 9:57 pm, edited 1 time in total.
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

not sure if i understand all that msl code, but i think you are trying to make people get a response from the bot when they say !wb in channel.

!wb + argument makes the bot respond with welcome back + argument
and
!wb without argument makes the bot respond with welcome back + nick

if thats the case you might try the code below, untested btw:

Code: Select all

bind pub - !wb wb_proc

proc wb_proc { nick uhost handle chan text } {
	set text [split $text]
	if { $text == "" } {
		putserv "PRIVMSG $chan :Welcome back $nick!"
	} else {
		putserv "PRIVMSG $chan :Welcome back [lindex $text 0]!"
	}
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: mIRC to TCL

Post by speechles »

holycrap wrote:Hi,

I have a simple mIRC code below which does the following:

<holycrap> !wb test
<bot> Welcome back, test!

How do I go about doing this in TCL? I want to add more commands, for exe in the code below I can just copy and paste the entire block and change *wb* to something else and I have another command. Can someone show me how to do this in TCL?

Thank you! :D

Code: Select all

on *:text:*wb*:#: {
  if $1 == %c $+ wb {
    if $2 == $null { msg $chan 13Welcome Back $nick $+ ! | halt }
    else { msg $chan 13Welcome Back $2 $+ ! }
  }
}
If they all are simply mirc remotes returning message to the channel. Why not just use the Putserv-O-Matic script and alter it's triggers, they are simply wildcard triggers the same as mirc would use. Change the flags in the bind below from it's present -|- of none to your flavor of control.

Code: Select all

bind pubm -|- "*" mycommands_proc 
h
holycrap
Op
Posts: 152
Joined: Mon Jan 21, 2008 11:19 pm

Post by holycrap »

Thanks guys! And much thanks to you speechles, I never knew "PutServ-O-Matic" existed.

:D
Post Reply