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.

Relay

Help for those learning Tcl or writing their own scripts.
Post Reply
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Relay

Post by Ace-T »

hey, im wanting to relay text from one net to another, i have found a script but need it modifing and not sure how,

i want to remove the nick (from net) from it, so it will only show the text written,

here is part of the code

Code: Select all


# proc used by all others for transmission
proc trans_bot { usercmd chan usernick text } {
	global eggdrops chans botnick
	set transmsg [concat $usercmd $usernick $text]
	set me [lsearch $eggdrops $botnick]
	if {$chan == [lindex $chans $me]} {
		putallbots $transmsg
	} else {
		return 0
	}
}

# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
	trans_bot ">pub" $chan $nick $text
}
sems to be trans_bot doing this but if i remove nothing happens, thx
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

if i understand you correctly, you are trying to remove the speakers nick from public messages. You didn't post all the code, so there's no telling if this is the only proc that needs to be altered. With that being said, just remove the nick from the proc

Code: Select all

# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
   trans_bot ">pub" $chan $text
} 
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

thats half :)

i also wanted to remove the net name to, so baiscally is just looks like the bots saying it as a normal convo,

atm its like this

nick2 (from EFNet)> hello

and i am wanting it like this

hello
w
w00f
Halfop
Posts: 49
Joined: Wed Oct 04, 2006 6:50 pm

Post by w00f »

Code: Select all

proc trans_bot { usercmd chan text } {
   global eggdrops chans botnick
   set me [lsearch $eggdrops $botnick]
   set transmsg [concat $usercmd $text] 
   if {$chan == [lindex $chans $me]} {
      putallbots $transmsg
   } else {
      return 0
   }
}

# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
   trans_bot ">pub" $chan $text 
} 
You might want to change ">pub" to "whatever you want" and bind that in the bot that will receive the msg(you can change "putallbots" to "putbot botnick" if you want just to send to a specific bot instead of all bots in your botnet)

Code: Select all

bind bot - "whatever you want" receive_botnet

proc receive_botnet { arg } {
blablabla
}
w00f


edit: lol take too long to reply ahah :x
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

thx for help guys ;)

all sorted
Post Reply