Fenetre de topic / banlist / mode salon

popelechat Messages postés 44 Date d'inscription dimanche 1 juin 2003 Statut Membre Dernière intervention 10 mai 2005 - 29 déc. 2004 à 15:34
Goliaw Messages postés 3 Date d'inscription vendredi 4 mai 2007 Statut Membre Dernière intervention 7 décembre 2008 - 7 déc. 2008 à 19:58
Bonjour,
J'ai récupéré une remote qui permet d'avoir l'historique des topic et avec un esthétique me convenant plus, mais j'ai un probleme car elle ne veut pas charger la liste des bans .. et je n'y arrive vraiment pas. Si quelqu'un aurait la gentillesse de m'aider :'(
voici la remote:

dialog channel {
title "Options du salon /channel"
size -1 -1 190 217
option dbu
box "Topic (sujet)", 1, 2 10 186 38
button "Annuler", 2, 149 197 38 16, cancel
combo 3, 5 33 180 85, size edit drop
icon 4, 5 19 180 11, Systeme/temptopic.bmp, 0, top
box "Liste des bannis", 5, 2 49 186 108
list 6, 5 70 180 67, size extsel hsbar
edit "", 7, 5 57 138 12, autohs
button "Clearbans", 8, 137 139 45 15
button "Bannir", 9, 145 57 38 12, disable
button "Supprimer", 10, 7 139 45 15, disable
button "Modifier", 11, 57 139 45 15, disable
check "Topic réservé aux ops", 12, 5 166 65 10
box "Modes", 13, 2 158 145 57
check "Pas de message externe", 14, 5 175 70 10
check "Entrée sur invitation", 15, 5 184 62 10
check "Modéré", 16, 5 193 30 10
check "Verrouillé :", 17, 5 202 35 10
edit "", 18, 40 202 34 10, autohs
check "Limité à", 19, 80 166 29 10
edit "", 20, 109 166 16 10, autohs center
text "users", 21, 127 167 15 8
check "Privé", 22, 80 184 25 10
check "Secret", 23, 80 175 26 10
check "Sans aucune couleur", 24, 80 192 62 10
button "Valider", 25, 149 161 38 16
text "", 26, 2 2 185 8
text "Autres:", 27, 80 203 19 8
edit "", 28, 100 202 44 10, autohs, read
button "Rafraichir", 29, 149 179 38 16
}
alias channel {
if ($chan($active).ibl == $false) { .enable #channelibl | mode $active +b | halt }
if ($exists(Systeme/temptopic.bmp) == $false) { window -ph +d @pp 0 0 400 22 | drawsave @pp "Systeme/temptopic.bmp" | close -@ @pp }
dialog -mo channel channel
}
#channelibl off
raw 367:*: { halt }
raw 368:*: {
if ( $exists(Systeme/temptopic.bmp) == $false ) { window -ph +d @pp 0 0 400 22 | drawsave @pp "Systeme/temptopic.bmp" | close -@ @pp }
.disable #channelibl | dialog -mo channel channel | halt
}
#channelibl end
alias topicwin {
if ($dialog(channel)) {
window -ph +d @pp 0 0 400 22
drawfill @pp $color(back) $color(back) 0 1
drawtext -pb @pp $color(normal) $color(back) Arial 11 5 3 $iif($did(channel,3),$did(channel,3),)
drawsave @pp "Systeme/temptopic.bmp"
close -@ @pp
did -g channel 4 "Systeme/temptopic.bmp"
} }
alias channelref {
if ($dialog(channel)) {
did -r channel 6,7
var %ibl = 1
while (%ibl <= $ibl($active,0)) {
did -i channel 6 $calc(%ibl + 1) $tab($ibl($active,%ibl),$gettok($ibl($active,%ibl).by,1,33) ( $+ $gettok($ibl($active,%ibl).by,2,33) $+ ),$asctime($int($calc($ibl($active,%ibl).ctime)),dd/mm/yy à HH:nn))
inc %ibl
} } }
on *:active:*:{ if ($dialog(channel)) && ($chr(35) isin $active) { dialog -x channel | dialog -mo channel channel } }
on *:dialog:channel:*:*:{
if ($devent == init) {
pdll | bolddialog $dname 1,5,13
mdx SetControlMDX channel 6 listview flatsb report grid showsel rowselect nosortheader > $vmdx
did -i channel 6 1 headerdims 156 82 98
did -i channel 6 1 headertext $tab(Adresse,Auteur,Date)
did -ra channel 26 $active : $nick($active,0) personnes ( $+ $nick($active,0,o) Ops - $nick($active,0,v,o) Voices - $nick($active,0,r,vo) Normaux $+ )
did -ra channel 1 Topic (sujet) - Mis par $hget(mstemp,$+(t,$active))
dialog -t channel Options du salon $active - Modes : $chan($active).mode
if (t isincs $gettok($chan($active).mode,1,32)) { did -c channel 12 }
if (n isincs $gettok($chan($active).mode,1,32)) { did -c channel 14 }
if (i isincs $gettok($chan($active).mode,1,32)) { did -c channel 15 }
if (m isincs $gettok($chan($active).mode,1,32)) { did -c channel 16 }
if (k isincs $gettok($chan($active).mode,1,32)) { did -c channel 17 | did -ra channel 18 $chan($active).key }
if (l isincs $gettok($chan($active).mode,1,32)) { did -c channel 19 | did -ra channel 20 $chan($active).limit }
if (p isincs $gettok($chan($active).mode,1,32)) { did -c channel 22 }
if (s isincs $gettok($chan($active).mode,1,32)) { did -c channel 23 }
if (c isincs $gettok($chan($active).mode,1,32)) { did -c channel 24 }
did -a channel 28 $removecs($gettok($chan($active).mode,1,32),+,t,n,i,m,k,l,p,s,c) $remove($gettok($chan($active).mode,2,32),$chan($active).limit,$chan($active).key)
did -rac channel 3 $chan($active).topic
if ($me !isop $active) did -b channel 8
var %temptopic = 1
while ($readini $mircdirSysteme/topic.ini $active %temptopic) { did -a channel 3 $creplace($readini $mircdirSysteme/topic.ini $active %temptopic) | inc %temptopic }
topicwin
channelref }
if ($devent == edit) {
if ($did == 3) { topicwin }
if ($did == 7) {
if ($did(7) != $null) { did -e channel 9 | did -b channel 10,11 }
else { did -b channel 9,10,11 } } }
if ($devent == sclick) {
if ($did == 3) { topicwin }
if ($did == 6) {
did -ra channel 7 $gettok($gettok($did(6).seltext,6,32),1,9)
if ($did(6,0).sel != 0) && (($me isop $active) || (a isin $usermode) || (o isin $usermode)) { did -e channel 10,11 | did -b channel 9 } | else { did -b channel 9,10,11 } }
if ($did == 8) {
var %nbbans = $ibl($active,0) while (%nbbans !0) { var %t %t $ibl($active,%nbbans) | if ($numtok(%t,32) == 5) { mode $active -bbbbb %t | unset %t } | dec %nbbans }
if (%t) { mode $active -bbbbb %t }
did -r channel 6 }
if ($did == 9) { mode $active +bbbbb $did(7) | did -r channel 7 | .timer 1 2 /channelref }
if ($did == 10) {
while ($did(6,0).sel != 0) {
var %varunban = %varunban $gettok($gettok($did(6,$did(6).sel).text,6,32),1,9)
if ($numtok(%varunban,32) == 5) { mode $active -bbbbb %varunban | unset %varunban }
did -d channel 6 $did(6).sel
if ($did(6,0).sel == 0) && (%varunban) { mode $active -bbbbb %varunban } }
did -b channel 10,11 }
if ($did == 11) { set %modifban $remove($gettok($did(6).seltext,6,32), +fs) | dialog -mo modifban modifban }
if ($did == 25) {
if ($me isop $active) || (a isin $usermode) || (o isin $usermode) { mode $active + $+ $iif($did(12).state 1,t) $+ $iif($did(14).state 1,n) $+ $iif($did(15).state == 1,i) $+ $iif($did(22).state == 1,p) $+ $iif($did(23).state == 1,s) $+ $iif($did(24).state == 1,c) $+ $iif($did(16).state == 1,m) $+ - $+ $iif($did(12).state == 0,t) $+ $iif($did(14).state == 0,n) $+ $iif($did(15).state == 0,i) $+ $iif($did(22).state == 0,p) $+ $iif($did(23).state == 0,s) $+ $iif($did(24).state == 0,c) $+ $iif($did(16).state == 0,m)
if ($did(19).state == 1) {
if ($did(20) isnum) && ($did(20) != $chan($active).limit) {
if ($did(17).state == 1) && ($did(18) != $chan($active).key) { mode $active +lk $did(20) $did(18) }
if ($did(17).state != 1) && (k isincs $chan($active).mode) { mode $active +l-k $did(20) $did(18) }
else { mode $active +l $did(20) } }
else {
if ($did(17).state == 1) && ($did(18) != $chan($active).key) { mode $active +k $did(18) }
if ($did(17).state != 1) && (k isincs $chan($active).mode) { mode $active -k $did(18) } } }
else {
if (l isincs $chan($active).mode) {
if ($did(17).state == 1) && ($did(18) != $chan($active).key) { mode $active -l+k $did(18) }
if ($did(17).state != 1) && (k isincs $chan($active).mode) { mode $active -lk $did(18) }
else { mode $active -l } }
else {
if ($did(17).state == 1) && ($did(18) != $chan($active).key) { mode $active +k $did(18) }
if ($did(17).state != 1) && (k isincs $chan($active).mode) { mode $active -k $did(18) } } }
if ($did(3).text != $chan($active).topic) { topic $active $did(3).text } }
dialog -x channel }
if ($did == 29) { dialog -x channel | channel }
} }
dialog modifban {
title "Modification d'un ban"
size -1 -1 110 48
option dbu
text "Modifier l'adresse du ban :", 1, 2 3 105 8, center
edit "", 2, 2 13 105 10, autohs center
edit "", 3, 7 35 26 10, disable autohs center
text "minute(s)", 4, 35 36 25 8, disable
button "Valider", 5, 67 25 40 10
button "Annuler", 6, 67 36 40 10, cancel
check "Retirer le ban dans :", 7, 3 24 60 10
}
on *:dialog:modifban:*:*:{
if ($devent == init) { if (!%modifban) { dialog -x modifban } | else { did -ra modifban 2 %modifban } }
if ($devent == sclick) { if ($did 7) { if ( $did(7).state 1 ) { did -e modifban 3,4 } | else { did -b modifban 3,4 } }
if ($did == 5) { if ( $did(2) !%modifban ) || ( $did(5).state 1 ) {
mode $active -b %modifban
if ( $did(7).state != 1 ) { mode $active +b $did(2) }
else { ban -u $+ $calc($did(3).text * 60) $active $did(2) }
unset %modifban
did -b channel 10,11 }
dialog -x modifban
.timer 1 2 /channelref }
} }

voila, j'aurais aimé vous fournir le fichier
"Systeme/temptopic.bmp"
Pour que vous puissier le tester mais je ne sais pas si c'est possible.

je vous remercie tous d'avance même si vous refusez de m'aider.

Joyeuse Fêtes a tous :)

5 réponses

Utilisateur anonyme
30 déc. 2004 à 02:46
Franchement même si tu m'a l'air bien sympathique, ton code est trop long et trop gros pour moi
Je ne peux pas t'aider dsl :)
0
COOLMAN002 Messages postés 969 Date d'inscription lundi 16 juin 2003 Statut Membre Dernière intervention 1 juillet 2012 1
30 déc. 2004 à 13:26
raw 367:*: did -ra channel 6 $3 | halt

esssaye de mettre ça.
0
popelechat Messages postés 44 Date d'inscription dimanche 1 juin 2003 Statut Membre Dernière intervention 10 mai 2005
30 déc. 2004 à 13:55
Non ça ne change rien non plus :(
La list de ban ne ce charge toujours pas :(

Merci quand même d'avoir pris le temps de regarder ;)
Bonne fêtes a toi

MorTiiS
0
COOLMAN002 Messages postés 969 Date d'inscription lundi 16 juin 2003 Statut Membre Dernière intervention 1 juillet 2012 1
30 déc. 2004 à 16:00
As-tu essayer de rentrer quelque chose dans la liste en tapant: /did -a channel 6 text
?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Goliaw Messages postés 3 Date d'inscription vendredi 4 mai 2007 Statut Membre Dernière intervention 7 décembre 2008
7 déc. 2008 à 19:58
if !$chan($active,0).ibl { mode $active +b }
var %i = 0 | while %i < $ibl($active,0) {
   inc %i
   did -i $dname 6 %i $ibl($active,%i)
}

ensuite libre à toi d'ajouter des infos telles l'heure de ban et l'auteur...
gl
0
Rejoignez-nous