1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| ;=====================================================================
Alias coach { if (!$1) { echo -a $timestamp Utilisation: /Coach <#Salon> } | else { set %m0z.chan $1 | sockclose coach. [ $+ [ $1 ] ] | sockopen coach. [ $+ [ $1 ] ] tchat.orange.fr 80 } }
dialog chaninfo {
title %m0z.chan
size 250 80 104 155
icon chaninfo\chaninfo.ico,0
option dbu
list 1, 0 0 105 156, size
button "x", 2, 194 123 37 12, ok
}
Alias -l mdx { return Chaninfo\mdx.dll }
Alias -l views { return Chaninfo\views.mdx }
Alias -l ic:d { did -i chaninfo 1 1 seticon normal $+(Chaninfo\,$1,.ico) }
Alias showchannel { if ($dialog(chaninfo)) { dialog -x chaninfo } | dialog -m chaninfo chaninfo }
on *:dialog:chaninfo:init:*:{
dll $mdx SetMircVersion $version | dll $mdx MarkDialog $dname
dll $mdx SetControlMDX 1 treeview haslines hasbuttons linesatroot showsel > $views
did -i $dname 1 1 iconsize normal small
$ic:d(coach) | $ic:d(fondateur) | $ic:d(membre) | $ic:d(off) | $ic:d(on) | $ic:d(suspend)
var %f = $+(Chaninfo\,%m0z.chan,.ini)
did -i $dname 1 1 cb root
did -a $dname 1 +be 1 1 Coach ( $+ $ini(%f,coach,0) $+ ) | did -i $dname 1 1 cb last
var %i = 1 | while (%i <= $ini(%f,coach,0)) { var %s = $readini(%f,coach,$ini(%f,coach,%i)) , %l = $iif(%s == 1,5,4) | did -a $dname 1 +e %l %l $replace($ini(%f,coach,%i),°°,[,¨¨,]) | inc %i }
did -i $dname 1 1 cb up
did -a $dname 1 +be 2 2 Fondateurs ( $+ $calc($ini(%f,fondatrice,0) + $ini(%f,fondateur,0)) $+ ) | did -i $dname 1 1 cb last
var %i = 1 | while (%i <= $ini(%f,fondateur,0)) { var %s = $readini(%f,fondateur,$ini(%f,fondateur,%i)) , %l = $iif(%s == 1,5,4) | did -a $dname 1 +e %l %l $replace($ini(%f,fondateur,%i),°°,[,¨¨,]) | inc %i }
did -i $dname 1 1 cb up
did -a $dname 1 +be 3 3 Membres ( $+ $ini(%f,membre,0) $+ ) | did -i $dname 1 1 cb last
var %i = 1 | while (%i <= $ini(%f,membre,0)) { var %s = $readini(%f,membre,$ini(%f,membre,%i)) , %l = $iif(%s == 1,5,4)) | did -a $dname 1 +e %l %l $replace($ini(%f,membre,%i),°°,[,¨¨,]) | inc %i }
unset %a | unset %b | unset %check. [ $+ [ %chaninfo ] ] | unset %chaninfo
.remove %f
}
on *:sockopen:coach.*:{
var %coach = $remove($gettok($sockname,2-,46),$chr(35)) , %x = $+(onglet=home&searchMode=alpha&searchType=salon&submit=submit&fichier=search_result&accesskey="enter"&alphaValueSalon=,%coach,&display=yes)
sockwrite -n $sockname POST /page.php HTTP/1.1
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded; charset=UTF-8
sockwrite -n $sockname Host: tchat.orange.fr
sockwrite -n $sockname Content-Length: $len(%x)
sockwrite -n $sockname User-Agent: m0zilla-w0rld
sockwrite -n $sockname Connection: close
sockwrite -n $sockname $crlf
sockwrite -n $sockname %x
}
on *:sockread:coach.*:{
sockread %a
var %coach = $remove($gettok($sockname,2-,46),$chr(35))
if (s"><strong>Pas de r isin %a) { echo -a 4***12 Le salon %coach n'a pas été trouvé... | sockclose $sockname | unset %a | halt }
if ($+(alt=",%coach," title=",%coach,") isin %a) { set %tmp. [ $+ [ %coach ] ] 1 }
if (%tmp. [ $+ [ %coach ] ]) && (&retour=home" class="plusInfos">plus d'infos <span> isin %a) {
var %chan = $gettok($gettok(%a,4,61),1,38)
set %coachfound 1 | sockopen coachinfo. [ $+ [ %chan ] ] tchat.orange.fr 80 | unset %tmp. [ $+ [ %coach ] ] | sockclose $sockname }
}
on *:sockclose:coach.*:if (!%coachfound) { echo -a 4***12 Le salon $gettok($sockname,2-,46) n'a pas été trouvé... | halt }
on *:sockopen:coachinfo.*:{
unset %coachfound
sockwrite -n $sockname get http://tchat.orange.fr/index.php?onglet=salons&salon= [ $+ [ $gettok($sockname,2-,46) ] ] $+ &retour=home
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded; charset=UTF-8
sockwrite -n $sockname Host: tchat.orange.fr
var %chan = $gettok($sockname,2-,46) , %f = $+(Chaninfo\,%chan,.ini)
if ($isfile(%f)) { .remove %f } | sockwrite -n $sockname User-Agent: m0zilla-w0rld | unset %check. [ $+ [ %chan ] ]
}
Alias -l Addz.most { writeini $+(",$mircdir,\Chaninfo\,%m0z.chan,.ini,") $1 $replace($2,[,°°,],¨¨) $3 }
on *:sockread:coachinfo.*:{
sockread %b
if (*tchat-gratuit/&otherNick=*<strong>*??*</strong>* iswm %b) { set %tmp.nick $gettok($gettok(%b,3,61),1,34) 1 }
if (*<span class="gris">*??*</span>* iswm %b) { set %tmp.nick $gettok($gettok(%b,2,62),1,60) 0 }
if (*<td class="*authent">fondat?*</td>* iswm %b) { tokenize 32 %tmp.nick | addz.most fondateur $1-2 }
if (*<td class="*authent">membre</td>* iswm %b) { tokenize 32 %tmp.nick | addz.most membre $1-2 }
if (*<td class="*authent">coach</td>* iswm %b) { tokenize 32 %tmp.nick | addz.most coach $1-2 }
}
on *:sockclose:coachinfo.*:showchannel
on *:Load:{ echo -a $timestamp Addon Coach 0,7Orange chargé! | coach | echo -a 13mÕžï6ll13ä6¬13wÔrl6Ð13Ž 14® } |
Partager