need some help on irc scripting reddit / irc ---------------------------------------------------------------------- xomfghi2u · 2015-10-09 06:47 is this the right place to ask ? got a question regarding scripting that i need some help with. would like to add it to my irc remote . there’s 2 irc channels. let’s call then #channel1 and #channel2; There’s 2 bots. One is mine, let’s call him “BOT1" (my bot is in both channels). The other bot is from a third person, let’s call him “BOT2”; BOT2 will only join #channel2 , while BOT1 will join both channel. I need the script to copy what ever is being said in #channel2 by BOT2 to #Channel1 via BOT1 is it possible ? Lets say BOT2 said *New stuffs added* on #channel2 , BOT1 will repeat the exact text to #Channel1 Can anyone provide any inside ? ---------------------------------------------------------------------- ne7split · 2015-10-09 09:50 Sure. You might wanna edit your post with the following information: * Client or standalone script * Language * What you need the script to do * What it does at the moment Let me know and I'll do my best to help. ---------------------------------------------------------------------- xomfghi2u · 2015-10-09 10:27 Thanks ! i have edited my post. Hope it helps. ---------------------------------------------------------------------- ne7split · 2015-10-09 10:55 OK, what you're looking for is a "relay bot". [Here's a thread with a very similar question](https://www.reddit.com/r/irc/comments/29w3lr/copycat_bot/). So, language agnostic/pseudocode instructions/considerations. BOT1 will have a trigger on public messages which will check if the output was issued by BOT2. function public_input($channel, $nickname, ...) { if $nickname is 'BOT2' { send a message to $outputchannel containing BOT2's output } } I can write a script for this if you can tell me what you would like it to run on (Windows? Linux? In your IRC client (mIRC, Irssi)? The examples from the other thread, I believe, relay *ALL* messages from the channel rather than just messages from $otheruser. With a little poking around you could probably modify their script. ---------------------------------------------------------------------- xomfghi2u · 2015-10-09 11:15 Thanks ! im running this from windows . would be great if u could write me one script. ---------------------------------------------------------------------- ne7split · 2015-10-09 13:20 [Try this out](https://github.com/n7st/Relay-Bot) - instructions in the README. ---------------------------------------------------------------------- xomfghi2u · 2015-10-09 14:30 thanks, is there anything i can add into mIRC's remote ? ---------------------------------------------------------------------- ne7split · 2015-10-09 15:37 I don't really write mSL. Might be worth waiting for someone else to help on that one. ---------------------------------------------------------------------- jumpking · 2015-10-09 15:53 I'll respond to your original comment with a solution. Give me a few minutes. ---------------------------------------------------------------------- jumpking · 2015-10-09 16:05 Place this script in your Remotes section of mIRC (ALT-R): on *:text:*:#channel2: { var %ch1 = #channel1 var %bot2 = NICKNAME_OF_BOT2 if (($me ison %ch1) && ($nick == %bot2)) { msg %ch1 $nick said: $1- } } You'll have to make a couple of changes to the script to suit your needs: * Change **#channel2** on line **1** to the second channel in your example. * Change **#channel1** on line **2** to the first channel in your example. * Change **NICKNAME_OF_BOT2** on line **3** to the nickname of the second bot in your example. I'll show you an edited example of the script working. Let's assume for a minute here that I have my mIRC bot named ***Reptar***. I want ***Reptar*** to mimic everything my friend's bot (named ***Bubbles***) says. ***Reptar*** is in the channels *#swag* and *#houseparty*. ***Bubbles*** is only in *#houseparty*. Using this example I am going to place the below script in the Remotes section of my mIRC bot, ***Reptar***. on *:text:*:#houseparty: { var %ch1 = #swag var %bot2 = Bubbles if (($me ison %ch1) && ($nick == %bot2)) { msg %ch1 $nick said: $1- } } ---------------------------------------------------------------------- xomfghi2u · 2015-10-09 16:26 thanks all for the help ! ---------------------------------------------------------------------- jumpking · 2015-10-09 16:31 No problem!