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 

!wb public command [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Mon Jun 08, 2009 9:11 am    Post subject: !wb public command [SOLVED] Reply with quote

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! Very Happy

Code:
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
Back to top
View user's profile Send private message
raider2k
Op


Joined: 01 Jan 2008
Posts: 140

PostPosted: Mon Jun 08, 2009 10:40 am    Post subject: Reply with quote

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:

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]!"
   }
}
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Jun 09, 2009 6:00 pm    Post subject: Re: mIRC to TCL Reply with quote

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! Very Happy

Code:
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:
bind pubm -|- "*" mycommands_proc

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Tue Jun 09, 2009 7:33 pm    Post subject: Reply with quote

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

Very Happy
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 -> Script Requests 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