mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2009
Posts: 1
A
Amun Offline OP
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Mar 2009
Posts: 1
This does not work:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy)
{
if ($server == chicago.us.p2pirc.org) {
/nsp2p | /j supertorrents | /j stmusic | /j pre
}
}
}

However, this does:

on *:CONNECT: {
if ($me == sas) || ($me == squatchy) && ($server == chicago.us.p2pirc.org) {
nsp2p
j #supertorrents
j #stmusic
j #pre
}

Am I just not seeing it? If I remove the nickname checking part in the first one, it works fine... But not with it in it.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
The reason the first one won't work is that a bracket is misplaced.
Quote:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy)
{

Should be:
Quote:
on *:CONNECT: {
if ($me == sas) || ($me == squatchy) {

Joined: Feb 2007
Posts: 75
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Yes the bracket and I can see you've programmed in C smile

May I just suggest that you use $network instead of $server, it's more flexible because it the same for all servers in the network, which helps if you connect to the round ribbon address (irc.whatever.com) instead of directly to a certain server (bleh.whatever.com).

Just thought that would help smile - later


GigIRC Network Admin
irc.gigirc.com
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You might be interested in looking at some other syntax rules that differ from C http://kthx.net/ftb/#34


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Feb 2007
Posts: 75
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Also I'll add to argv0's link's list of difference, that mIRC scripts don't like TAB. One time I spent hours looking for the error in my script, which I just couldn't find, only to discover that I used TAB instead of spacebar with a few lines of code.


GigIRC Network Admin
irc.gigirc.com

Link Copied to Clipboard