mIRC Home    About    Download    Register    News    Help

Print Thread
#26330 27/05/03 06:38 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
on 1:unban:#: {
if ($banmask isin perm.ini) { /mode $chan +b $banmask }
else { /halt }
}


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#26331 27/05/03 06:47 AM
Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
No. Show me the syntax of your perm.ini file.


- cF
Dedicated helper for rent.
#26332 27/05/03 06:50 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
what do u mean


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#26333 27/05/03 06:54 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
He means he wants you to paste the contents of your perm.ini.

#26334 27/05/03 07:45 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
victoria!*smile@cnq34-155.cablevision.qc.ca
CaveDAH!*CaveDAH@CPE006067480131-CM014390036299.cpe.net.cable.rogers.com
Heather!*Heather@dhcp065-025-114-064.neo.rr.com
SIDESHOW!*SIDESHOW1@CPE00055dcfba04-CM.cpe.net.cable.rogers.com
D3amon!*z@187-47.SPEEDe.golden.net
what i want perm banned

Last edited by andymps; 27/05/03 07:46 AM.

Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#26335 27/05/03 07:48 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
You don't need the ELSE statement either. The script will halt itself if the IF statement is false.

#26336 27/05/03 07:56 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
ok but it still doesnt work frown


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#26337 27/05/03 09:01 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Why do you call this file an ini? Looks like a plain text to me. ini files have a special structure, and so mirc has a different set of tools to manipulate them.

Anyway, mirc doesn't care about the extension. A proper script will always work, no matter how you name your files.

As for the script, "isin" isn't the appropriate operator for scanning files, because it's designed for strings comparison (string v1 is in string v2).

You can use $read() with the s switch,which scans the file for a line beginning with a specified text (in this case - $banmask) and returns the rest of the line.

Here, there's nothing after the banmask, thus $read() will return nothing -- but, $readn can help us to determine if one line actually matched in the last call to $read().
Code:
On @!*:unban:#:{
  if !$read(perm.ini,s,$banmask) && $readn {
    mode # +b $banmask
  }
}

If you want to learn more about any command or identifier, type /help <command>.

#26338 27/05/03 09:34 AM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
ok and how do u get it to delete something from the file
using a command

Last edited by andymps; 27/05/03 09:35 AM.

Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#26339 27/05/03 10:03 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
/write -ds"ban mask" perm.ini

See /help /write smile

#26340 27/05/03 12:09 PM
Joined: Dec 2002
Posts: 339
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
Why not use $ulist?
I think reading an ouytside file might get you lagged if you are in a big channel with many joins smile

#26341 28/05/03 03:14 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
"Here, there's nothing after the banmask, thus $read() will return nothing -- but, $readn can help us to determine if one line actually matched in the last call to $read(). "
Or you could use the -w switch. smile
Code:
on @!*:unban:#:{
  if $read(perm.ini,w,$banmask) { mode # +b $banmask }
}

#26342 28/05/03 04:25 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Yea, but that's a problem, because w supports a wildcard match.

In this way, the script would tend to stick odd banmasks, like *!*@*, because as a wildcard it matches any address stored in perm.ini

#26343 28/05/03 04:29 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Very true shocked


Link Copied to Clipboard