Am I an op?

By SoxFarxAway777 on Aug 23, 2008

Just a simple code for a bot to tell you whether or not you're op/half-op/or voice.

on *:TEXT:Am I an op?:#: {
  if ($nick isop $chan) { /msg $chan Yes, $nick $+ , you are an op! =D }
  if ($nick ishop $chan) { /msg $chan No, $nick $+ , you are a half op! :O }
  if ($nick isvoice $chan) { /msg $chan No, $nick $+ , you are voiced. =/ }
  else { halt }
}

Comments

Sign in to comment.
napa182   -  Sep 02, 2008

a tad bit late to that reply DragonFlare.

Jonesy44 said:
i dont think isvoice even exists..

mountaindew said:
jonesy, isvoice exists :) isvoice nickname v1 has a voice on channel v2

Jonesy44 said:
then i take it back, sorry :P

 Respond  
DragonFlare   -  Sep 02, 2008

is it strange that he hasnt replied back?
Jonesy44 Said:

i dont think isvoice even exists..

It exists Jonesy i use v1 v2 instead of !isvoice
thats probally why youve never seen it because everyone uses V1 and V2

No Rating From Me Either 0/10

 Respond  
KronicDreamer   -  Aug 24, 2008

i love the else {halt} which is completely $null lmao
anyways 1/10

 Respond  
beau   -  Aug 24, 2008

Oh good, I've been looking for a script like this forever!!
rates a 1

 Respond  
AlexHopper   -  Aug 24, 2008

lol

 Respond  
Zmodem   -  Aug 24, 2008

jonesy44: I beg to differ. You see, the parser will run much quicker when you don't re-use $nick & $chan over and over; it will keep on referring back to it's event and reading the identifiers over and over. However, setting them to static variables makes the parser run much quicker because now the call is set in stone, no longer being retrieved but inserted. It's not going to be leaps and bounds quicker, but quicker nonetheless ;)

Also, if you are referring to the %m variable and using $chr(44), it's merely this way because you can't use multiple ',' (commas) within $iif(), such as: $iif(1 == 1,First Response:No, you can't have that comma,Second Response: You can't have this one, either). But, that's obviously something learned (syntax-wise) early on, so I'm sure you know that :)

 Respond  
pwnisher3   -  Aug 23, 2008

lol well this is a useless script
i havn't head not one person on my server say hat

 Respond  
Eugenio   -  Aug 23, 2008

i dont think isvoice even exists..
lmaooooo

 Respond  
Jonesy44   -  Aug 23, 2008

Zmodem, some of those vaars are not necesary :P

 Respond  
Cheiron   -  Aug 23, 2008

we should do another snippet... am i scripter :)... only joking...

there are a few scripts on hawkee for showing what levels of power you have in what channels. this is a different take on them though i must admit

 Respond  
Zmodem   -  Aug 23, 2008

How about:

on *:TEXT:Am I an op?:#: {
  var %c = $chan, %n = $nick, %m = $chr(44) $+ %n $+ $chr(44)
  msg %c $iif(%n isop %c,Yes $+ %m you are an op! =D,$iif(%n ishop %c,No $+ %m you are a half op! :O,$iif(%n isvoice %c,No $+ %m you are voiced =/,%n you are not anything! :p)))
}

Didn't test, sorry, not sure if it's right.

 Respond  
guest598594   -  Aug 23, 2008

Sox, I would use elseifs.

if ($nick isop $chan) {
elseif ($nick ishop $chan) {
elseif ($nick isvoice $chan) {

Because you could be op and voice, and it'll say "yes you are op. no you are voice".

Oh and you don't need the else { halt }.

 Respond  
pwnisher3   -  Aug 23, 2008

hmm i think you should add ( no $nick you are an admin )

 Respond  
Jamiie   -  Aug 23, 2008

Yeah jonsey, isvoice exists.

 Respond  
Jonesy44   -  Aug 23, 2008

then i take it back, sorry :P

 Respond  
guest598594   -  Aug 23, 2008

jonesy, isvoice exists :)

isvoice nickname v1 has a voice on channel v2

 Respond  
Jonesy44   -  Aug 23, 2008

I totally agree with Typo. Forums should be used more actively. Even saying that, i dont use them very much. Perhaps hawkee should consider making the forums more popular on the front page, like last 10 forum posts?

 Respond  
Typo   -  Aug 23, 2008

And yet another completelty pointless waste of space on hawkee.
The only thing scripts like this do is push real scripts off the recent list.
I'm really getting tired of it. This is the only site I post on and its getting to where posting here is a waste of time because it gets lost in junk like this.

Scripts like this are way better suited for say the forum or just kept yourself.

It's like a lil while back when someone posted a one line On Text that was a simple "Welcome to #Channel".
What the hell is the point in posting crap like that? I mean the mirc help file has more complated examples for an on text than that.

Some people would argue that this is a learning site and to them I say this:
I agree but stuff like the example above should be in the forum. If someone comes here wanting a script as simple as that then a request for it in the forum would have a valid reply or ten in no time at all.

People keep posting crap and every time they say they didn't test because they were in a hurry or they say that its pointless or stupid but they know that and were just bored so don't say so.

If you know its pointless or stupid, if you havent had the time to test a script and CONFIRM IT WORKS, if your code is something that can be found in the examples in a newbie mirc tutorial or if function of your script was to cure boredome when making it and not actually something usefull to others than just keep it to yourself ir take it to the forums.

It doesn't make you look cool to have a dozen snippets if theyre all crap and its just ruining the site.

A lot of this comment is me being fed up with this site goind down hill so fast and not intended to be aimed at the OP in particular. Yes this script did get me going but tbh its not half as bad as most the ones im refering to.

 Respond  
Jonesy44   -  Aug 23, 2008

i dont think isvoice even exists..

 Respond  
Jamiie   -  Aug 23, 2008

Why use this if you can just look to the left of you name @=op, %=halfop, and +=Voice.. Stuff like this has no meaning, doesn't deserve a score from me.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.