mIRC Home    About    Download    Register    News    Help

Print Thread
#222980 11/07/10 11:28 AM
F
Fluxparadox
Fluxparadox
F
Guys who can edit this code, not working.. -.- i want that only owner can do this 2-command sir.

command are: !record <host ip> <name> <reason> and !info <host ip>

Code:
on *:TEXT:!record*:#:{
if ($4 == $null) {
notice $nick insufficient parameters
notice $nick Syntax Error: !record <host ip> <name> <reason>
halt
}
if ($4 != $null) && ($nick isowner #) {
writeini record.ini $2 IP $2
writeini record.ini $2 Name $3
writeini record.ini $2 Offense $4-
.notice $nick $2 Successfully added to record List.
}
else { notice $nick Access Denied. }
}


if i type !record <host_ip_here> <name> <reason> , this will automatic record to the record.ini.

Like e.g:
Kenji: !record *!*@9FADDB1E.45E1C144.D00F7FE1.IP Jaijai respect each other.

- and if i type !info. this the format.


KenJi: !info *!*@9FADDB1E.45E1C144.D00F7FE1.IP
-BOT- : Information for *!*@9FADDB1E.45E1C144.D00F7FE1.IP
-BOT- : Jaijai
-BOT- : Have a record: respect each other.


thnx

#223012 12/07/10 05:36 AM
F
Fluxparadox
Fluxparadox
F
anyone/??

#223019 12/07/10 07:22 AM
K
KageNoOni
KageNoOni
K
As far as I can tell, there isn't an "isowner" comparison in mIRC. Instead of "if ($4 != $null) && ($nick isowner #) {" you could try "if ($left($nick(#,$nick).prefix,1) == ~) {" instead. It checks to see if the first character of the nickname with all prefixes, is ~. If that is the case, then that person is the owner, and it will continue. Also, I took out the ($4 != $null) because if $4 was $null, the script would stop processing before it reaches that line. As such, adding the extra comparison is redundant. Also, you could use elseif instead of if for the same effect and remove the /halt command.

#223020 12/07/10 07:33 AM
5
5618
5618
5
Originally Posted By: KageNoOni
As far as I can tell, there isn't an "isowner" comparison in mIRC. Instead of "if ($4 != $null) && ($nick isowner #) {" you could try "if ($left($nick(#,$nick).prefix,1) == ~) {" instead.

There is an isowner operator, but it doesn't work consistently across all IRCds.
Apart from that, your approach is close, but there is no .prefix property for $nick. I think you mean .pnick and then you can simply do...
Code:
if (~ isin $nick($chan,$nick).pnick)

...since the position of ~ is irrelevant due to the fact that it's an illegal nick character. Make sure ~ is the network's prefix for channel founder/owner though.

Furthermore, $nick($chan,$nick,q) may work just as well.

#223023 12/07/10 09:00 AM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
I thought ~ meant admin aka +a. So I believe it should be $nick(#,$nick,~)

Tomao #223025 12/07/10 09:04 AM
5
5618
5618
5
In my experience ~ is founder (+q) on most networks. Admin (+a) is usually &.
There are always exceptions of course. Sometimes both are & and sometimes one of them is !.

#223026 12/07/10 11:34 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Yeah, "founder" status varies from ircd to ircd. It's not really a standard. That's why there's not a 100% working check in mIRC for it. The best way to handle it is to find out what is used for founder on the network you're using it on and then use one of the examples above.

As a note, ! is admin on irchighway. smile


Link Copied to Clipboard