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.

I need help with this? GREETS

Old posts that have not been replied to for several years.
Locked
m
mimic
Voice
Posts: 25
Joined: Wed Mar 12, 2003 10:34 pm

I need help with this? GREETS

Post by mimic »

Hello..

I've tried to search for a tcl that greets a specific nick with a specific msg onjoin but no success so far. I also need it to determine the person host so the greets will not go for a wrong place .. any ideas

peace
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

info <--
then do .chanset #channel +greet
Elen sila lúmenn' omentielvo
m
mimic
Voice
Posts: 25
Joined: Wed Mar 12, 2003 10:34 pm

Post by mimic »

hi again

I know about this. No password is needed. i want the bot to greet the person when he joins the channel, and i need it random, like if he joins now the bot will greet with la la la, then he joins again lets say after a few hours then the bot will greet him with something diff . you know what i mean?
and i want to add a specific host so the bot will not greet the wrong person..


Peace
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

set greetlines {
  "la la la la"
  "le le le le"
  "hmmm.."
}
bind join -|A * greet:special
proc greet:special {nick host hand chan} {
  set greet [lindex $::greetlines [rand [llength $::greetlines]]]
  putserv "PRIVMSG $chan :$greet"
}
[code]
very basic greeting, just add the person to your bot (no need for him to set pass if you don't wan't him to), then do [b].chattr user +A #channel[/b]
note.. +A is a userset flag, and [b]not[/b] the same as the +a flag
Elen sila lúmenn' omentielvo
m
mimic
Voice
Posts: 25
Joined: Wed Mar 12, 2003 10:34 pm

Post by mimic »

this code doesn't seem to work? you mind check it again and correct the broken code.

peace
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Any errors or something like this?
Once the game is over, the king and the pawn go back in the same box.
m
mimic
Voice
Posts: 25
Joined: Wed Mar 12, 2003 10:34 pm

Post by mimic »

the code is not working so no chance to capture an error.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

did you add the nick to the userlist
as Papillon suggested?
I once was an intelligent young man, now i am old and i can not remember who i was.
Y
Yoda
Halfop
Posts: 78
Joined: Thu Oct 24, 2002 2:57 am
Location: Milano, Italy
Contact:

Post by Yoda »

Code: Select all

bind join - * join_tous
proc join_tous {nick host hand chan} {
  if {$chan == "#channel"} {
puthelp "PRIVMSG $nick : "channel rules"
  }
  if {($chan == "#channel") && ([string tolower $nick] == "nick")} {
			putmsg $chan "message"
				}
    }
I use this script to send a pvt msg onjoin to all with channel rules and a customized greet to a specified nick
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

You should follow Papillon's sugestions.

Yoda: since the #channel is in lower chars then the

Code: Select all

if {$chan == "#channel"} { 
should be in fact:

Code: Select all

if {[strlwr $chan] == #channel} { 
same thing goes to the next $chan == "#channel" check.
Once the game is over, the king and the pawn go back in the same box.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

caesar wrote:You should follow Papillon's sugestions.

Yoda: since the #channel is in lower chars then the

Code: Select all

if {$chan == "#channel"} { 
should be in fact:

Code: Select all

if {[strlwr $chan] == #channel} { 
same thing goes to the next $chan == "#channel" check.
strlwr is of course not a tcl command, but a procedure provided by alltools.tcl (i believe). If you do not have alltools.tcl loaded, then you should be using 'string tolower' in place of 'strlwr'.
Locked