mIRC Home    About    Download    Register    News    Help

Print Thread
#153123 11/07/06 03:30 PM
S
sas22
sas22
S
Is this possible
Code:
on *:ctcpreply:VERSION:if (mirc isin (I need an identifier for the reply)) { .echo $nick is safe from channel floods }

Eh I hope you all get the idea of it just to identify what IRC client someone is using so that it will be safe for a code I'm writing.

#153124 11/07/06 04:45 PM
Joined: Mar 2003
Posts: 612
B
Pan-dimensional mouse
Offline
Pan-dimensional mouse
B
Joined: Mar 2003
Posts: 612
$1-

/help on ctcpreply

Last edited by billythekid; 11/07/06 04:47 PM.

billythekid
#153125 11/07/06 07:19 PM
S
sas22
sas22
S
blush

#153126 11/07/06 07:33 PM
S
sas22
sas22
S
Nows heres the code
Code:
on !*:deop:#:{ if ($opnick == $me) && ($nick isop #) && ($nick != Chanserv) { 
    .ctcp $nick version 
    if (upp isin $1-) { cs deop # $nick | cs ban # $nick You should have thought twice | cs unban # | .timer 1 1 join # } else 
    .timer -h 1 0 .cs op # $me 
  }
}

It isn't working..

#153127 11/07/06 07:39 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Well,

cs unabn #

Is obviously spelled incorrectly, but I guess thats not where you get stuck...

#153128 11/07/06 07:40 PM
S
sas22
sas22
S
The problem is when I ctcp version the user they do have UPP in the reply but it keeps going to the else

#153129 11/07/06 07:45 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Try modifying to:

Code:
   if (upp isin $1-) { cs deop # $nick | cs ban # $nick You should have thought twice | cs unban # | .timer 1 1 join # }
   else { .timer -h 1 0 .cs op # $me }
  }
}


Notice the { ... } around the else statement.

#153130 11/07/06 07:48 PM
S
sas22
sas22
S
It didn't work..

#153131 11/07/06 07:52 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Perhaps wildmatching then?

if (upp* iswm $1-) {
or
if (upp* isin $1-) {
or
if (*upp* iswm $1-) {

And otherwise I wouldn't know... :tongue:


EDIT:
Or Adding the halt command at the end of the if statement.

Code:
   if (upp isin $1-) { cs deop # $nick | cs ban # $nick You should have thought twice | cs unban # | .timer 1 1 join # | halt }
   else { .timer -h 1 0 .cs op # $me | halt }
  }
}

Last edited by OrionsBelt; 11/07/06 07:55 PM.
#153132 11/07/06 07:54 PM
S
sas22
sas22
S
nope =/

#153133 11/07/06 10:44 PM
S
sas22
sas22
S
Is the aswer to make the if statement an alias?

#153134 11/07/06 10:52 PM
D
DaveC
DaveC
D
You cant issue a ctcp $nick version and then test the return of it on the next line in your script, you can only test its returned value in the CTCPREPLY even, like you began with.

#153135 11/07/06 10:56 PM
Joined: Mar 2003
Posts: 612
B
Pan-dimensional mouse
Offline
Pan-dimensional mouse
B
Joined: Mar 2003
Posts: 612
you havent got a versionreply yet in that code.

heres the pseudocode

on deop check for version

on versionreply if upp isin $1- kickban nick

btk

[edit] DaveC got there first! lol, isn't that always the way... cool [/edit]

Last edited by billythekid; 11/07/06 10:57 PM.
#153136 12/07/06 12:06 AM
S
sas22
sas22
S
Code:
on !*:deop:#:{ if ($opnick == $me) && ($nick isop #) && ($nick != Chanserv) {
    set %uppc #
    set %UPPn $nick 
    .ctcp $nick version
  }
}
on *:ctcpreply:VERSION*:{ 
  if ($nick == $UPP);$UPP = alias UPP /return %UPPn ; && (upp isin $1-) { 
    cs deop %uppc $nick | cs ban %uppc $nick You should have thought twice | cs unban %uppc | .timer 1 1 join %uppc | unset %uppn | unset %uppc
    else { .timer -h 1 0 .cs op # $me 
    }
  }
}
This is what Im using now


Link Copied to Clipboard