PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
;========= = - -;Op Conference v1.5;By Asriel;mirc version: 6.02+ (does't work with anything but);-------- - -;It's not much to oogle over;so don't feel bad about stealing;or deleting it...;========= = - -;To install, just put this file;Wherever and type; /load -rs wherever\the\file\is\opconf.mrc;Enjoy it.;-------- - -on *:load: { if ($version < 6.02) { /echo -a Your version of mirc is too old, get with it. /unload -rs " $+ $scriptdir $+ opconf.mrc $+ " /halt}else { set %autopop $true /echo -a Op Conference Script by Asriel loaded! /echo -a Type /ops to initiate an ops conference}};========= = - -; Dialogs;========= = - -dialog op_conf { title "Op Conference" size -1 -1 231 158 option dbu edit "", 2, 3 141 176 13, multi autohs button "Send Message", 3, 182 142 44 12, default list 4, 181 4 45 135, size edit "", 1, 3 4 176 135, multi vsbar};========= = - -; Remotes;========= = - -on ^*:notice:*:*: { ;-------- - - ;When you get a notice... ;-------- - - if ($target == $+(@,$chan)) { ;-------- - - ; Is it an op notice... ;-------- - - if ((!$dialog(op_conf)) && (%autopop == $true)) { ;-------- - - ; If the /ops dialog isn't open, open it.. ;-------- - - set %chan $chan dialog -md op_conf op_conf dialog -t op_conf Op Conference: %chan } ;-------- - - ; Add the initial notice to the list ;-------- - - did -a op_conf 1 $+([,$nick,]) $1- $crlf } halt}on ^*:text:*:*: { ;-------- - - ;When you get a msg... ;-------- - - if ($target == $+(@,$chan)) { ;-------- - - ; Is it an op msg... ;-------- - - if ((!$dialog(op_conf)) && (%autopop == $true)) { ;-------- - - ; If the /ops dialog isn't open, open it.. ;-------- - - set %chan $chan dialog -md op_conf op_conf dialog -t op_conf Op Conference: %chan } ;-------- - - ; Add the initial notice to the list ;-------- - - did -a op_conf 1 $+([,$nick,]) $1- $crlf } halt};-------- - -; When you click 'Send Message'..;-------- - -on *:DIALOG:op_conf:sclick:3: { ;-------- - - ; Op notice the chan, and update the window ;-------- - - //onotice %chan $did(op_conf,2) did -a op_conf 1 $+([,$me,]) $did(op_conf,2) $crlf did -r op_conf 2 ;Clear the editbox did -f op_conf 2 ;Select the editbox, so you can start typing ;without having to re-click the box};-------- - -; When the window opens...;-------- - -on *:DIALOG:op_conf:init:*: { ;-------- - - ; /op_list scans for the ops in the room, and ; adds them to the list in the window ;-------- - - op_list ;-------- - - ; /list_refresh sets a timer to refresh the nicklist ; in case someone gets deoped or joins, or whatever.. ;-------- - - list_refresh};-------- - -; When you close..;-------- - -on *:DIALOG:op_conf:close:*: { ;-------- - - ; Unset all the [gasp] variables! ;-------- - - unset %chan unset %ops timer.refresh off timer.refresh1 off};-------- - -; When you doubleclick a name...;-------- - -on *:DIALOG:op_conf:dclick:4: { ;-------- - - ; Get rid of the @'s and queries the dude.. ;-------- - - set %nick $replace($did(op_conf,4).seltext,@,$null) query %nick unset %nick};========= = - -; Aliases;========= = - -alias -l op_list { ;-------- - - ; This crazy business scans for ; ops in the room, and adds them to a tokenlist ; THEN adds them to the list in the window ;-------- - - var %a = $nick(# $+ %chan,0,o) while (%a) { set %ops $addtok(%ops,$nick(# $+ %chan,%a,o),46) dec %a } set %ops $sorttok(%ops,46) set %x 1 while (%x <= $nick(# $+ %chan,0,o)) { set %name $+(@,$gettok(%ops,%x,46)) did -a op_conf 4 %name inc %x } unset %name unset %x}alias ops { if (!$dialog(op_conf)) { set %chan $chan dialog -md op_conf op_conf dialog -t op_conf Op Conference: %chan if ($1) opsay $1- if ($1) did -a op_conf 1 $+([,$me,]) $1- } else { ;-------- - - ; If the dialog is open, bring it to front (then unlock) ;-------- - - dialog -o op_conf op_conf dialog -n op_conf op_conf }}alias -l list_refresh { .timer.refresh 0 30 did -r op_conf 4 .timer.refresh1 0 30 op_list}alias opsay { //onotice %chan $1-};========= = - -; Popup.. yawn;========= = - -;-------- - -; People didn't like it automaticaly poping up, so; I added a toggle;-------- - -menu channel { Op Conference .Open Op Conference: /ops .- .Turn AutoPopup $iif(%autopop == $true, OFF, ON): $iif(%autopop == $true, set %autopop $false, set %autopop $true) ;If autopop is on, it will only show "turn OFF", and if it's off.. it will only show "Turn ON"};========= = - -; End Script;========= = - -