mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2
X
X1alpha Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
X
Joined: Jan 2004
Posts: 2
Hi,

I wonder whether there's a difference between one and two slashes (/) particularly when I write a script. Here's why I ask that question: on some IRC-networks you're able to set the usermode +x to hide your hostmask. I wrote a script - two or three lines - that does so whenever I connect to one of my favourite networks, e.g. QuakeNet. Once I connect to QuakeNet the script authenticates me and sets usermode +x. At least it does so in theory. In fact sometimes it fails to set the usermode I'd like it to set. I changed the script so that two slashes precede the mode $me +x. The next time I connected the script did what it had to do and I didn't care anymore. However I dis- and reconnected once again and guess what - the script did not set my usermode.

All I know by now is that my script sometimes tries to set a channel's mode to +x which doesn't work. Apperently the command mode $me +x makes the script take my current nickname ($me) as the name of a channel whose usermode is to be set. I'd like to know how to control that, how to ensure that my usermode becomes +x instead of a non-existent channel's mode. Plus I'm very curious about how single and double slashes might help me solving the problem.


Sven
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
in the script editor slashes are actually optional. Slashes I tend to use as it outlines commands, especially in long blocks of code, but are again trviial. The //'s are used only in the chat input to tell mirc to "Execute identifiers and avriables". i.e. goto a window and type:

/set %a 1
/echo -a %a
//echo -a %a

Notice the latter will execute for the value of a. This is handy for things like setting topics (//topic # blah instead of //topic #mychannelname blah), Etc.

If your script isn't working properly you have a problem with the script itself, not with if you prefixed with a /, // or nothing at all.


-KingTomato
Joined: Jan 2004
Posts: 5
G
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
G
Joined: Jan 2004
Posts: 5
The problem is not so much to do with your script but an issue where you are attempting to change your usermode prior to authentication of your name. You merely need slow down the usermode change by a second (or 5) to ensure you have authenticated correctly prior to attempting to change your usermode. Change the usermode script to a once-off timer and see how it goes.

Joined: Jan 2004
Posts: 2
X
X1alpha Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
X
Joined: Jan 2004
Posts: 2
It works, thank you for the hint. I changed the script so that it waits a few seconds until it changes my usermode. Obviously I sometimes wasn't authenticated completely when the script executed. The problem's solved and the topic may be closed.


Sven

Link Copied to Clipboard