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.

putserv/putquick

Old posts that have not been replied to for several years.
Locked
j
jlbprof

Post by jlbprof »

I am trying to make my eggdrop bot display a message in the chatroom. Looking in tcl-commands.doc it would appear that putserv or putquick would do the work, but if i use either of them no message comes out on the chatroom.

Here is my script:

-----------------------------------------
set greet_a "Howdy"
set greet_b "I'm BodgerBot enjoy this"

proc join_greet { nick uhost hand chan } {
global greet_a greet_b

putserv "A $greet_a $nick $greet_b" -next
putquick "B $greet_a $nick $greet_b" -next

dccbroadcast "I am greeting $nick"
return 0
}

bind join - #tfm join_greet

dccbroadcast "greetjlb.tcl installed"
-----------------------------------------

Any suggestions why I cannot put a message out to the chatroom?

Thanx

Bodger
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

You're sending the command "A" to the IRC server, which it won't understand. I'm assuming you want a PRIVMSG, in which case you would do:

putserv "PRIVMSG $chan :$greet_a $nick $greet_b"

Note that for these types of text messages you should use "puthelp" instead of "putserv", and you should definitely not use "putquick" which is supposed to be reserved for very important things (e.g. locking the channel quickly).
j
jlbprof

Post by jlbprof »

Thank you sir, that worked.

But now that I have the global variables greet_a and greet_b, I should be able to change them via partyline, but I cannot seem to do it.

I have tried

.tcl set greet_a "XX Howdy"
What? You need '.help'

I am owner on the channel I should be able to do that correct?

Thanx
Bodger
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Usually only permanent owners can use the .tcl and .set commands (depends on config file setting).

My suggestion is to make your own dcc command to do it. Something simple like this:

Code: Select all

bind dcc - setgreet dcc_setgreet

proc dcc_setgreet {hand idx text} {
  global greet_a
  putdcc $idx "Setting greet_a to $text"
  set greet_a $text
  return 1
}
Change it according to your needs (add flag checks, whatever) and you should be set.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

Why are you guys posting questions related to TCL in the eggdrop section?

Lately, TCL questions being posted on the eggdrop section have become regular now..

I request the moderator to look into it please...
Dormant egghead.
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

(sarcastic message deleted)

<font size=-1>[ This Message was edited by: slennox on 2002-02-09 02:11 ]</font>
Locked