Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l txt { return $mircdir $+ badnicks.txt }
- alias -l list_secs { return 5 }
- alias -l mychan { return #test }
- ON *:TEXT:!*:$($mychan): {
- tokenize 32 $strip($1-)
- if ($1 == !add) {
- if (!$2) { msg $chan ( $+ $nick $+ ): Insert a nickname! | return }
- var %r = $read($txt,ntw,$2)
- var %rn = $readn
- if (%r) || (%rn) { msg $chan ( $+ $nick $+ ): Error, $2 does already exists on the list! | return }
- write $qt($txt) $2
- msg $chan ( $+ $nick $+ ): $2 has been added on the list.
- }
- if ($1 == !del) {
- if (!$2) { msg $chan ( $+ $nick $+ ): Insert a nickname! | return }
- var %r = $read($txt,ntw,$2)
- var %rn = $readn
- if (!%r) || (!%rn) { msg $chan ( $+ $nick $+ ): Error, $2 does NOT exists on the list! | return }
- write -dl $+ %rn $qt($txt)
- msg $chan ( $+ $nick $+ ): $2 has been removed from the list.
- }
- if ($1 == !viewlist) {
- var %t = $lines($txt)
- var %s = $file($txt).size
- if (!%t) { msg $chan ( $+ $nick $+ ): Error There is NOT any nickname exists on the list! | return }
- msg $chan ( $+ $nick $+ ): Retriving the list... check your private!
- msg $nick Start of file.. - (Items: %t $+ )
- var %i = 1
- while (%i <= %t) {
- var %r = $read($txt,nt,%i)
- if (%r) { .timer[MSG_ $+ $nick $+ _ITEM_ $+ %i $+ _LIST] 1 $calc(%i * $list_secs) msg $nick $+([,$chr(35),%i,]:) %r }
- inc %i
- }
- .timer[MSG_ $+ $nick $+ _LISTEND] 1 $calc(%t * $list_secs + 1) msg $nick End of file. - (Size: $bytes(%s).suf $+ )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement