יוצר: Ventox
גירסא: 1.0
תיאור: Infoline פשוט.
הפעלה: קליק ימני Infoline by Ventox
תמונה:
קוד: בחר הכל
dialog Infoline {
title "Infoline by Ventox [/i]"
size -1 -1 175 94
option dbu
list 1, 1 2 142 40, size
button "Add", 2, 144 3 30 12
button "Rem.", 3, 144 16 30 12
button "Clear", 4, 144 29 30 12
box "Infolines", 5, 2 43 172 50
list 6, 4 51 140 39, size
button "Add", 7, 146 52 25 12
button "Rem.", 8, 146 65 25 12
button "Clear", 9, 146 78 25 12
}
alias i { if (!$dialog(Infoline)) dialog -m Infoline Infoline }
on *:Dialog:Infoline:init:*: {
var %x = 1
while ($ulist(*,Infoline,%x)) { did -a $dname 1 $ifmatch $iif($ulist(*,Infoline,%x).info,( $+ $ulist(*,Infoline,%x).info $+ )) | inc %x }
}
On *:Dialog:Infoline:sclick:*: {
if ($did == 8) && ($did($dname,6).seltext) {
var %i = $replace($replace($did($dname,6).seltext,$chr(91),$chr(190)),$chr(93),$chr(189))
var %h = $replace($replace($gettok($did($dname,5),3,32),$chr(91),$chr(190)),$chr(93),$chr(189))
var %x = 1
while ($ini(Infos.ini,%h,%x)) {
if ($readini(Infos.ini,%h,$ini(Infos.ini,%h,%x)) == %i) { did -d $dname 6 %x | .remini -n Infos.ini %h $ini(Infos.ini,%h,%x) }
inc %x
}
}
if ($did == 9) {
var %Sure = $input(Aure you sure clear all Infoline for this user?,y,Aure you sure clear all Infoline for this user?)
if (%Sure == $true) {
did -r $dname 6
var %h = $replace($replace($gettok($did($dname,5),3,32),$chr(91),$chr(190)),$chr(93),$chr(189))
.remini -n Infos.ini %h
.write Infos.ini $chr(91) $+ %h $+ $chr(93)
}
}
if ($did == 7) { var %I = $input(Type Infoline,e,Type Infoline) | if (%i) { var %h = $replace($replace($gettok($did($dname,5),3,32),$chr(91),$chr(190)),$chr(93),$chr(189)) | .writeini -n Infos.ini %h $r(2,99999) $replace($replace(%i,$chr(91),$chr(190)),$chr(93),$chr(189)) | did -a $dname 6 %I } }
if ($did == 1) && ($did($dname,1).seltext) {
if ($did($dname,5) !== Infoline(s) for: $ifmatch) { did -ra $dname 5 Infoline(s) for: $did($dname,1).seltext }
var %x = 1
did -r $dname 6
var %h = $replace($replace($did($dname,1).seltext,$chr(91),$chr(190)),$chr(93),$chr(189))
while ($ini(Infos.ini,%h,%x)) {
did -a $dname 6 $replace($replace($readini(Infos.ini,%h,$ini(Infos.ini,%h,%x)),$chr(190),$chr(91)),$chr(189),$chr(93))
inc %x
}
}
if ($did == 3) && ($did($dname,1).seltext) { did -r $dname 6 | .ruser Infoline $gettok($did($dname,1).seltext,1,32) | .remini -n Infos.ini $replace($replace($gettok($did($dname,1).seltext,1,32),$chr(91),$chr(190)),$chr(93),$chr(189)) | did -d $dname 1 $did($dname,1).sel }
if ($did == 2) {
var %Mask = $input(Type Mask? (Nick/Address ...),e,Type Mask? (Nick/Address ...))
if (%Mask) {
var %I = $input(Type Infoline,e,Type Infoline)
if (%i) {
if ($level(%Mask) !== Infoline) { .auser Infoline %Mask | did -a $dname 1 %Mask }
var %h = $replace($replace(%mask,$chr(91),$chr(190)),$chr(93),$chr(189))
.writeini -n Infos.ini %h $r(2,99999) $replace($replace(%i,$chr(91),$chr(190)),$chr(93),$chr(189))
did -ra $dname 6 $replace($replace(%i,$chr(91),$chr(190)),$chr(93),$chr(189))
did -ra $dname 5 Infoline(s) for: %Mask
var %x = 1
did -r $dname 6
while ($ini(Infos.ini,%h,%x)) {
did -a $dname 6 $replace($replace($readini(Infos.ini,%h,$ini(Infos.ini,%h,%x)),$chr(190),$chr(91)),$chr(189),$chr(93))
inc %x
}
}
}
}
if ($did == 4) {
var %Sure = $input(Aure you sure clear all Infoline?,y,Aure you sure clear all Infoline?)
if (%Sure == $true) { did -r $dname 1 | var %x = 1 | while ($ulist(*,Infoline,1)) { .ruser Infoline $ifmatch | inc %x } }
}
}
On Infoline:join:#: {
var %z = $replace($replace($maddress,$chr(91),$chr(190)),$chr(93),$chr(189))
var %r = $r(1,$ini(Infos.ini,%z,0))
var %C = $+ $r(2,13) | msg # %C $+ R14andom %C $+ I14nfoline %C $+ F14or %C $+ $left($nick,1) $+ 14 $+ $mid($nick,2,$calc($len($nick) -2)) $+ %C $+ $right($nick,1) 14[ $+ %C $+ $+ %r $+ 14/ $+ $ini(Infos.ini,%z,0) $+ ]: $replace($replace($readini(Infos.ini,%z,$ini(Infos.ini,%z,%r)),$chr(190),$chr(91)),$chr(189),$chr(93)) ( $+ %C $+ V14entox@ $+ %C $+ S14cript)
}
menu nicklist,query {
Infoline
.Add Infoline {
var %Mask = $input(Type Mask? (Nick/Address ...),e,Type Mask? (Nick/Address ...),$iif($address($$1,2),$ifmatch,$$1))
if (%Mask) {
var %I = $input(Type Infoline,e,Type Infoline)
if (%i) { if ($level(%Mask) !== Infoline) .auser Infoline %Mask | var %h = $replace($replace(%mask,$chr(91),$chr(190)),$chr(93),$chr(189)) | .writeini -n Infos.ini %h $r(2,99999) $replace($replace(%i,$chr(91),$chr(190)),$chr(93),$chr(189)) }
}
}
.Infoline { i }
}
menu channel,status {
Infoline Dialog by Ventox { i }
}