/* ISOP.amirx by Ariel Magnum ** How to check if a user is opped ** Provides a function to paste to your script */ Options Results /* Enable rc/result return codes */ signal on syntax /* Enables syntax checking */ prefix='ISOPDemo'/* Prefix for echos */ colour=3 /* Colour fo echos */ /* Begin */ /* This is how it works */ "GETMYNICK" mynick=result "GETUSERS" users=result if find(users,'@'mynick) ~= 0 then cecho("You are opped") if find(users,'@'mynick) = 0 then cecho("You are not opped") if find(users,'+'mynick) ~= 0 then cecho("You are voiced") if find(users,'+'mynick) = 0 then cecho("You are not voiced") /* how to call the function */ "GETCHANNEL" channel=result /* You need to provide a channel */ "GETSELECTEDUSER CHANNEL="channel nick=result /* And a nick - for this example we give it the selected user */ if isop(channel,nick) then cecho("User" bold(nick) "is opped") else cecho("User" nick "is not opped") /* End */ exit /* Shared Functions */ isop: "GETUSERS CHANNEL="arg(1) if find(upper(result),'@'upper(arg(2)))~==0 then return 1 return 0 bold: /* This function bolds text*/ return '02'x||arg(1)||'02'x underline: /* This function underlines text*/ return '1F'x||arg(1)||'1F'x inverse: /* This function inverses text*/ return '16'x||arg(1)||'16'x cecho: /* This function echo's text to listview*/ "ECHO P="d2c(27)"b«"prefix"» C="colour arg(1) return 0 syntax: /* This function returns where you made a syntax error */ prefix="Syntax" cecho("Command on line" SIGL "returned" RC ":" errortext(rc) sourceline(SIGL)) exit