Skip to content
MSN

Bots

A TG007 community discussion started by Rudeboy.

Discussion 13 posts
Page 1 of 1
Open
Topic #1963 · 13 published posts · 829 views

Ok heres a wierd request lol im looking for a way to set my bot to be able to talk to my other bot which is on a different server. IE i want it to where if someone say it on one server in one room it will repeat it on another server in another room. I'm thinkin maybe using sockwrite but not sure where to began. Any suggestions?

 

Make it write the text to a file, then have the other script read the file... but im not sure how it would do it automaticaly though.

if you're talking about linking 2 different applications, you will have a tough time. if you're talking about the 2nd bot repeating on a different server what the 1st bot initially says on the other, then why not run all remotes in one unit, be on 2 differents servers, and set the text to msg on both/all servers in select or all channels.

close but not exactly. One bot sits on one server. Takes whatever is said in that room on that server by anyone and transmits it to the other bot on the other server.

 

ie. if someone said say

<blah> whats going on

 

2nd bot would repeat:

<bot2> <blah> whats going on

 

into the room on the other server

 

i was attempting to do it but i cant figure out how to have the same bot on both servers and differentiate between which one to send it to

 

Edited Nov 21, 2004 11:57 AM by Rudeboy

if you're referring to your bot as an irc application, then you can be on 2 or more servers at a time

well firstly, it is possible.

 

but it could only be done through 1 mIRC. So then it gets alittle trickly. Secondly, it would involve your own coding because noone is going to sit there writing it up for you. I can give you an example i guess.

 

on *:TEXT:*:#: {
if (%o. [ $+ [ $chan ] ] != $null) && ($me ison %o. [ $+ [ $chan ] ])  { /msg %o. [ $+ [ $chan ] ] $chan - $nick said $1- }
}

on *:JOIN:#: { if ($nick == $me) { set %o. [ $+ [ $chan ] ] $?="Please input the full room name in IRC format in which you want this chat room to echo to" } }

on *:PART:#: { if ($nick == $me) { unset %o. [ $+ [ $chan ] ] } }

 

it most likely wont work, but you can give it a try. This is something you would be looking at though.

theortically ...... CTCP can help u ..

but i never tried ctcp betweens server ..

so ... u could try the ctcp ..event

Dont you need to be on the same server to send a ctcp request though?

That's what I thought, Mr_S :\

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

yes u do need to be on the same server to use ctcp and like gatekeeper said the only way it can be done is through the same mirc

Write the data to two different textfiles like Glitch said. Check those with a timer.

For example:

In bot 1:

on *:text:<botname2 here>*:#:{ write bot1.txt $2- }
alias checkbot2 {
 if $lines(bot2.txt) { msg <channel1 here> bot2 says: $read(bot2.txt,1) | write -dl1 bot2.txt }
}

start a timer here: /timercheckbot2 0 1 checkbot2

 

In bot 2:

on *:text:<botname1 here>*:#:{ write bot2.txt $2- }
alias checkbot1 {
 if $lines(bot1.txt) { msg <channel2 here> bot1 says: $read(bot1.txt,1) | write -dl1 bot1.txt }
}

start a timer here: /timercheckbot1 0 1 checkbot1

 

why not just use one script on 2 servers , that way it can do what you want

 

My code does NOT have bugs. It just develops random features.

I tried that ozzy but it doesnt seem to want to differentiate the socket to write to. I get the on text to work but when I try to get the message part to work it sends it to the same server it got it from.