I am a noob in mirc scripting, and I need some help.
1. there is 2 irc channels. lets call then #channel1 and #channel2;
2. There are 2 bots. One is mine, lets call him mybot (my bot is in both channels). The other bot is from a third person, lets call him otherBot;
What I need is … let me make an example to better explain.
a) in #channel1 some user type:
[14:38:48] <@someuser> !user xpto
At this time, mybot is in both channels. he reads the command !user* and copy/paste it in #channel2, where the otherBot will recognize the command !user* and will paste some information about this command.
b) so, in #channel2 it will append something like:
[14:38:50] <@ mybot > !user xpto
[14:38:52] <@ otherBot > User name is xpto and he likes popatos.
Now I want that mybot reads the information provided by the otherBot and then paste it on #channel1
c) so, in #channel1:
[14:38:54] <@ mybot > User name is xpto and he likes popatos.
So far I have the fowling code in my remote:
on *:TEXT:!user*:# channel1 {
/msg # channel2 $1-
}
on *:TEXT:User name*:#channel2 {
if $address($nick,2) == *!*@otherBot.users.gameea {
/msg # channel1 $1-
}
}
This works fine, but have a problem: if someone else ( not mybot ) type !user kakaka in #channel2, mybot will also copy/paste the information provided by the otherBot and then paste it on #channel1. And I only want that mybot copy/paste only the information that mybot ask to otherBot.
Any suggestion?
Thanks!