An All In One Private Chat
Instead of going to window to window on pm, you can use this
It will display all of the nicks from channels you are on, on the server, and doesn't put user in twice if they are in 2 rooms
JD My friend fixed some things in the script, thanks
dialog -l NC {
title "All-In-One Private Chat - By TophBeiFong"
size -1 -1 245 200
option dbu
edit "", 1, 0 0 200 182, multi, autohs, read,
button "Send", 2, 140 184 24 12, default
edit "", 3, 2 185 135 10, autohs, return
list 4, 200 0 45 182, sort, extsel, size, vsbar
button "Block", 5, 165 184 40 12 default
button "Unblock", 6, 205 184 40 12 default
}
alias query {
privatechat $1-
}
alias Privatechat {
if ($dialog(NC)) {
dialog -v NC
}
else {
dialog -md NC NC
}
did -f NC 3
}
on 1:dialog:nc:sclick:2: {
.did -a NC 1 < $+ $me $+ > $did(3) $+ $crlf
.msg $$did(4).seltext $$did(3)
.did -r NC 3
}
on 1:dialog:nc:sclick:5: {
.did -a NC 1 $did(4).seltext has been Blocked $+ $crlf
.ignore $address( $+ $did(4).seltext $+ ,2)
}
on 1:dialog:nc:sclick:6: {
.did -a NC 1 $did(4).seltext has been Unblocked $+ $crlf
.ignore -r $address( $+ $did(4).seltext $+ ,2)
}
on ^*:text:*:?:{
.did -a NC 1 < $+ $nick $+ > $1- $+ $crlf
}
on *:DIALOG:NC:init:*: {
did -m $dname 1
var %i 1
while (%i <= $chan(0)) {
var %j 1
while (%j <= $nick($chan(%i),0)) {
nc.adduser $nick($chan(%i),%j)
inc %j
}
inc %i
}
}
alias -l nc.adduser {
if (!$nc.isuser($1-)) {
did -a NC 4 $1-
}
}
alias -l nc.deluser {
if ($nc.isuser($1-)) {
did -d NC 4 $ifmatch
}
}
alias -l nc.isuser {
return $didwm(NC,4,$1-)
}
ok he fixed... what about this?
on ^*:text:*:?:{
.did -a NC 1 < $+ $nick $+ > $1- $+ $crlf
.closemsg $nick
.haltdef
}
cause if you use this
.did -a NC 1 < $+ $nick $+ > $1- $+ $crlf
without check, if the dialog NC is openned all you will see on status is
you need to check first, if the dialog its openned or not
about this
on ^*:text:*:?:{
.did -a NC 1 < $+ $nick $+ > $1-
.haltdef
}
if the person receives a pm, and the dialog NC is closed?
you can use this
on *:text:*:?:{
if ($dialog(NC)) { did -a NC 1 < $+ $nick $+ > $1- | .closemsg $nick }
}
that will analize if the dialog is openned, and then will close the pm, if not, it will receive the pm normally