/* Kuang Eleven 1.3 Public Channel Commands Module by Ariel you may use the following args passed from kuang-events nick - the nick who requested channel - the channel the command came from imop - Boolean (1/0) if your opped autochan - Boolean (1/0) to check if the command was made on an autochannel pxf - users flags in your friends list.Generally its wise to limit access to users with c flag. pxt - target's access flags. text - the complete message text WITHOUT the command prefix mynick - your nick command - The command issued(uppercase) target - the person who the command is to be excuted on args - More arguments , if specified to put in short it parses command target args from the text ... take a look at the functions at the end of the script and use them if you like. Modify this script if you like... */ debug=0 /*turn this to 1 to enable syntax checking and arguments debug line*/ /*Init Line - DO NOT MODIFY */ options results;parse arg nick channel pxf pxt imop autochan text;"GETMYNICK";mynick=result;parse var text command target args;upper command;if target='-' then target='';if debug=1 then do;signal on syntax;cecho('debug',nick command target argss pxf pxt);end Select /* example command entry when command='MYCOMMAND' then do amrx('Myscript' arguments) ^- launches a script as if it was lanuched with /rx end */ when command='BILL' then do setclip('st_bl',nick) amrx('billgates') delay(500) getclip('st_bl')=nick then setclip('st_bl') end when command='VOICE' then mod('+v' nick) when command='UNVOICE' then mod('-v' nick) when command='PHILOSOPHY'|command='PHIL' then if imop&autochan&nick~=mynick&target~=''&getclip('st_th')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_th',nick) amrx('philosophy' target channel) delay(500) getclip('st_th')=nick then setclip('st_th') end when command='SPLATT' then if imop&autochan&nick~=mynick&target~=''&getclip('st_sp')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_sp',nick) amrx('splatt' target channel) delay(500) getclip('st_sp')=nick then setclip('st_sp') end when command='INSULT'|command='RIN' then if imop&autochan&nick~=mynick&target~=''&getclip('st_rn')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_rn',nick) amrx('rin' target channel) delay(500) getclip('st_rn')=nick then setclip('st_rn') end when command='BRAIN' then if imop&autochan&nick~=mynick&target~=''&getclip('st_br')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_br',nick) amrx('PinkyBrain' target channel) delay(500) getclip('st_br')=nick then setclip('st_br') end when command='BUTT' then if imop&autochan&nick~=mynick&target~=''&getclip('st_bt')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_bt',nick) amrx('butt' target channel) delay(500) getclip('st_bt')=nick then setclip('st_bt') end when command='MOMMA' then if imop&autochan&nick~=mynick&arget~=''&getclip('st_mm')~=nick&pos('c',pxf)~=0&pos('p',pxt)=0 then do setclip('st_mm',nick) amrx('momma' target channel) delay(500) getclip('st_mm')=nick then setclip('st_mm') end When command='O'|command='OP' then if pos('o',pxf)~=0&imop&autochan then op(nick) When command='ADDF' then if pos('s',pxf)~=0 then do Select when target='' then notice(nick,'Specify user') when args='' then notice(nick,'Specify flags') otherwise setclip('st_rsys',nick) amrx('kuang11c ADDF' target args) end end When command='ADDH' then if pos('s',pxf)~=0 then do if target~='' then do setclip('st_rsys',nick) amrx('kuang11c ADDH' target args) end else notice(nick,'Specify user') end When command='SETF' then if pos('s',pxf)~=0 then do Select when target='' then notice(nick,'Specify user') when args='' then notice(nick,'Specify flags') otherwise setclip('st_rsys',nick) amrx('kuang11c SETF' target args) end end When command='SAVE' then if pos('s',pxf)~=0 then do setclip('st_rsys',nick) amrx('kuang11c SAVEF') end When command='SHOOT' then if getclip('st_sh')~=nick&target~==''&imop&autochan&pos('c',pxf)~=0 then do setclip('st_sh',nick) if pos('p',pxt)~=0 then k=0;else k=1 if upper(nick)=upper(target) then tg='himself';else tg=target 'say' nick 'picks up the revolver .....' 'say' nick 'spins the chamber ... Round and round it goes .....' 'say' nick 'points the gun at' tg 'and pulls the trigger ....' Select when upper(target)=upper(mynick) then kick(channel,nick,inv('KABOOM') 'The gun explodes in his hands') when upper(nick)=upper(target) then kick(channel,nick,inv('KABOOM') 'Goodbye cruel world...') when k then kick(channel,target,inv('BANG') 'got him right between the eyes') otherwise 'say Click Cliq, lucky son of a bitch!!' end delay(500) getclip('st_sh')=nick then setclip('st_sh') end otherwise end exit /*## Shared stuff here */ kick:;'RAW KICK' arg(1) arg(2) ':'bld(arg(3));return 0 op:;mod('+o' arg(1));return 0 mod:;'RAW MODE' channel arg(1);return 0 amrx:;'SAY /RX' arg(1);return 0 notice:;'RAW NOTICE' arg(1) ':'arg(2);return 0 bld:PROCEDURE;b=x2c('02');return b||arg(1)||b und:PROCEDURE;u=x2c('1F');return u||arg(1)||u inv:PROCEDURE;i=x2c('16');return i||arg(1)||i cecho:;"ECHO P="d2c(27)"b«"arg(1)"»" arg(2);return 0 vecho:;"ECHO P="d2c(27)"b«Kuang11»" und(arg(1)||':') arg(2)'.';return 0 syntax: cecho('K11PUB',"Command on line" SIGL "returned" RC ":" errortext(rc) sourceline(SIGL)) exit