mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 325
W
Wolfie Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
I've tried researching to see if there is an easy way to resolve this problem, and either I'm missing it, or there isn't one.

For the servers I connect to, I use multiple connections, which when using seperate computers is no problem. However, when they are on the same computer (bots, for example), there can be issues.

For some networks, simply using $network provides an easy way to treat each network seperately (scripts that are network independant). There are other networks though that provide a network name, and there in is a problem, because #1 logs are saved into the same location, #2 its hard to have the scripts know which bot it is.

Is there a variable (identifier) that I am overlooking? Is there an easy way to have the script know which group name it is connected to (the name I assigned the group in the server list that is)?

In case of confusion, I mean simply this: Lets say I make a duplicate list of servers, but for one copy I name the group "Bot_1" and the other I name the group "Bot_2", if the connection was established using "/server -m Bot_2", and once connected, the network name changes to "IRC", how do I know that it's "Bot_2" and not "Bot_1" when the $network identifier will always say "IRC"?

Edit:
As an added note/inquiry, is there a way to have mIRC save logs into directories based on the name of the connection (name that I specify) as an alternative to the network name? There is one network where I have over 2 bots running in the same mirc instance and with everything being saved to the location, log files (especially status) end up having everything combined. You can imagine the problem created if they happen to be in the same room.

Last edited by Wolfie; 07/08/03 09:39 AM.
Joined: Aug 2003
Posts: 325
W
Wolfie Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
*bump*

Hoping someone can give me a response to this problem.

Anyone?

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Don't use $network .. or at least, don't use ONLY $network .. use something like $cid $+ . $+ $network intead.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Aug 2003
Posts: 325
W
Wolfie Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Problem with that is that it still won't make each connection a constant and unique connection. For example, running a connection called "ChatBot", to identify it's settings and responsibilities, I was using $network to make a unique identifier for variables and for timers and for saving information in .ini files. However, that only works for networks that don't specify a network name (and then I can make it what I want it to be via the name of the group in the servers listing). For those that do, that becomes a useless concept.

Some examples of what I am talking about....
>> set %kick.room $+(%,kicker.,$network,.,$1)
on some networks, $network would be ChatBot (as I set it, and for different connections would be whatever else I set it) However, on a fixed-name system, it's always 1 name, so it's almost pointless to have the $network variable in there. With $1 being the name of the room, I need the above variable to look like this:
%kick.room %kicker.ChatBot.#RoomName
(or if it's on a bot, say WolfieBot)
%kick.room %kicker.WolfieBot.#RoomName
Of course, my variables are a little more complex but you get the idea. The same is also true for making timers.
If I understand $cid correctly, one time, the $cid for one connection could be 1, the next time it could be 5 or 6 or 10 (although on fixed connections, it *should* always be constant, but for times when that isn't the case...)
For the timer function, I can see that $cid is actually a wonderful solution to the problem. Yeah I might not know what timer is which by seeing something like "NickCheck.1" instead of "NickCheck.ChatBot" but since timers are not carried over from one session to the next, I think I can learn to deal lol

As a temporary solution, I have actually made use of the $cid, although it has been a little sloppy. Other mehods I have attempted to try (and the problems I have encountered) have been to use the real name field to put the fixed name in there (so the first line of a whois will show the "nick [email]email@host[/email] nick" but then I can't use that field for things like advertising my site wink
If there was either a way to grab the group name of the specific connection, or a variable that could be set (like with the /server command) that wouldn't affect the whois but would still remain fixed even during disconnects/reconnects, that would be wonderful.

However, if there is an added trick behind $cid that I am majorly not seeing, please do fill me in.


Link Copied to Clipboard