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 

Relay

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Tue May 22, 2007 8:03 pm    Post subject: Relay Reply with quote

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:


# 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
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Tue May 22, 2007 8:36 pm    Post subject: Reply with quote

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:
# proc transmission of pub (trans_pubm = y)
proc trans_pub {nick uhost hand chan text} {
   trans_bot ">pub" $chan $text
}

_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Tue May 22, 2007 8:43 pm    Post subject: Reply with quote

thats half Smile

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
Back to top
View user's profile Send private message
w00f
Halfop


Joined: 04 Oct 2006
Posts: 49

PostPosted: Tue May 22, 2007 8:44 pm    Post subject: Reply with quote

Code:

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:

bind bot - "whatever you want" receive_botnet

proc receive_botnet { arg } {
blablabla
}


w00f


edit: lol take too long to reply ahah Mad
Back to top
View user's profile Send private message
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Tue May 22, 2007 8:58 pm    Post subject: Reply with quote

thx for help guys Wink

all sorted
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 -> Scripting Help 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