; -- Webchat joiner.
alias Webchat_Join {alias Webchat_Join {
var %Channel = $$?=" $+ $Eval($Lang(m_webroom), 2) $+ "
if (%Channel) {
Web_Join $Chan_Encode(%Channel) %Channel
}
}
alias Chan_Encode {
var %C = $$1
%C = $Replace(%C, $Chr(32), \
%C = $Replace(%C, \, $(%5c, ), ; , $(%3b, ))
return $(%25%23, ) $+ %C
}
alias Web_Join {
var %Encoded = $$1, %Decoded = $$2
hadd -m %Decoded CHANNEL %Encoded
if ($Window(@webchat. $+ %Decoded)) window -c @webchat. $+ %Decoded
window @webchat. $+ %Decoded
dialog -m Webchat. $+ %Decoded Webchat
}
dialog Webchat {
title "Webchat"
size -1 -1 600 480
}
alias Webchat_Callback return
on *:DIALOG:Webchat.*:INIT:0:{
var %D = $Dname, %Channel = $Hget($Gettok(%D, 2, 46), CHANNEL)
dcx Mark %D Webchat_Callback
xdialog -b %D +
xdialog -c %D 100 webctrl 0 0 640 480
xdid -n %D 100 $+($MainSettings(CONNECTION, CHANLINK), /chatui.aspx?rm=, %Channel)
xdialog -l %D root $Chr(9) +pv 0 0 0 0
xdialog -l %D cell root $Chr(9) +li 100 10 0 0
.timer 1 0 xdialog -l %D update
.timer 1 0 xdock -c $Dialog(%D).hwnd +s $Window(@WEBCHAT. $+ $Gettok(%D, 2, 46)).hwnd
}