11-19-2017, 06:08 +0100
AuthorPost
thommey  07-24-2004, 17:33   | [EGG] Use variables inside strings and replacing them later Jabber
(Administrator)
Member since 03/2004
62 Posts
                                                                                                                              
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
set greetmsgs {
    "Hi, how are you?"
    "Hi $nick!"
    "Hello $nick, welcome to $chan"
    "]]] WELCOME to $chan!!!11111 ^^ ^^ [[["
    "Hi [$nick], you have to pay 20$ to enter here"
}

bind join - * greet
proc greet {nick host hand chan} {
    set greetmsg [lindex $::greetmsgs [rand [llength $::greetmsgs]]]
    set greetmsg [subst -nocommands $greetmsg]
    putserv "PRIVMSG $nick :$greetmsg"
}


This post was edited 2 times, last on 08-12-2009, 22:08 by thommey
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen