mIRC Home    About    Download    Register    News    Help

Print Thread
#116375 04/04/05 02:45 PM
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
I'm currently using a script that someone else has made and in it has a guest kicker which kicks nicks that include the word Guest but for some reason there is an error and I am uinable to find where the error is coming from. Any help on this is greatly appreciated. What happens is when the guest kicker is turned on and someone with guest in their nickname enters the room i see
• Joins : Guest2248460 (blah@blahblahblah)
[ø] Error : /= is an unknown command
. The guest kicker works and does it's thing but always does this when a guest nick enters. Below is the code if somone could please look over it and help me it would truely stop me from going insane.

Code:
alias guestkick {
  if ($nick !isop $chan) && ((%guest.warned. $+ $nick) != 1) { 
    if (($nick ison $chan) && ($me isop $chan)) goto kick
    else  { goto end }
    :kick
    .timerguest.msg 1 5 msg # $nick Change Your nick to a real nick or get kicked. Type /nick (new nick). You have 60 seconds before you will be kicked. $logo2 | set %guest.warned. $+ $nick 1
    .timerguest.ban 1 29 ban -u60 $chan $nick
    .timerguest.kick 1 30 kick $chan $nick $c(1) $+ No guests allowed in $bracket($chan) - 1 minute ban 
    .timerguest.msg.last 1 31 .msg $nick You were kicked for using a GUEST NICK and put on a 60 second ban. Change your nick and then you can come back. Type /nick (new nick). $logo2 | unset %guest.warned. $+ $nick
  } 
  :end
}

on @*:ACTION:*:#:{
  if ((*guest* iswm $nick) && (%guest.kick == On)) guestkick
  else { goto end }
  :end
}

on @*:NICK:{
  if (*guest* !iswm $newnick) { .timerguest.ban off | .timerguest.kick off | .timerguest.msg.last off }
  else { goto end }
  :end
}

on @*:JOIN:#: {
  if ((*guest* iswm $nick) && ($me isop #) && (%guest.kick == on)) guestkick
  else { goto end }
  :end
}

on @*:TEXT:*:# {
  if ((*guest* iswm $nick) && (%guest.kick == On)) guestkick
  else { goto end }
  :end
}

#116376 04/04/05 05:10 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
((%guest.warned. $+ $nick) != 1) << thats badly formated, should be >> (%guest.warned. [ $+ [ $me ] ] == 1)

But your specific error well be in one fo these 4 called aliases (3 ones called twice), looks like your invision is broken :-)

$logo2
$c(1)
$bracket($chan)
$logo2

#116377 04/04/05 05:53 PM
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
I tried you're code
(%guest.warned. [ $+ [ $me ] ] == 1) in place of what was there and now it doesn't work at all. I put the old code back in it's place and the kicker now works again but the error is still there but the error is coming from that code because i replaced the != in the original code with the == in your code and the error changed to /== is an unknown error.

#116378 04/04/05 11:00 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
ooops sorry was late, i tested it using myself in a line while not connected, and forgot to correct it to yours when i pasted it.
((%guest.warned. $+ $nick) != 1) << thats badly formated, should be >> (%guest.warned. [ $+ [ $me ] ] == 1)
should have read
((%guest.warned. $+ $nick) != 1) << thats badly formated, should be >> (%guest.warned. [ $+ [ $nick ] ] != 1)

I was also wrong in believing the error was in those $identifiers


The reason your one doesnt work is while you can set a value using /SET %guest.warned. $+ $nick 1 you can not access it in the same way you must use %guest.warned. [ $+ [ $nick ] ] or $($+(%,guest.warned.,$nick),2).
The result of using this wrong construct is as follows
if ($nick !isop $chan) && ((%guest.warned. $+ $nick) != 1) { $nick is say FRED, $chan is say #blah, %guest.warned. holds no value so evaluates to nothing
if (FRED !isop #blah) && (( $+ FRED) != 1) { also $+ joins the left and the right sides together so you get (FRED which superseeds ( as a bracket
if (FRED !isop #blah) && ( (FRED ) != 1) { If 1st condition is $true and the 2nd condition is always $true you end up with...
if ( $true ) && ( $true) != 1) { two true conditions well trigger the folowing command which is != 1) this is an unknown internal mirc command = with a dont use alises ! on the front so is sent to the irc server to see if its a command there, this replies with :Unknown command you can test this yourself using /!= 1) {

Using the correct construct like so gets...
if ($nick !isop $chan) && (%guest.warned. [ $+ [ $nick ] ] != 1) {
if (FRED !isop #blah) && (%guest.warned.FRED != 1) {
if (FRED !isop #blah) && ( $null != 1) {
if ( $true ) && ( $true ) {
^ this was the intended action.


I still beleieve there is some errors in your script (to do with multi user processing, and how timers treat |), but give it a try just using (%guest.warned. [ $+ [ $me ] ] != 1) see if it suits your needs.

#116379 05/04/05 08:15 PM
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
hey there DaveC thank you for all your help. It is finally working exactly how it should with no errors. That is one thing that is finally solved so i can't blame going insane on that. Once again, thanks and it's greatly appreciated.


Link Copied to Clipboard