Haven't tried this, yet. However, here is something I came up with...
on *:TEXT:*:?: {
var %wtext. [ $+ [ $nick ] ] = $nick $+ : $1-
.msg $nick Waiting for $me to accept whisper. Please wait...
if (!%wnick. [ $+ [ $nick ] ]) {
if ($input(Do you want to accept incoming whisper from $nick $+ ?,n,Incoming Whisper from $nick $+ .) == $true) {
set %wnick. [ $+ [ $nick ] ] $nick
echo %wnick. [ $+ [ $nick ] ] %wtext. [ $+ [ $nick ] ]
}
else {
.msg $nick Access to whisper has been denied.
closemsg $nick
}
}
else echo %wnick. [ $+ [ $nick ] ] %wtext. [ $+ [ $nick ] ]
}
on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ]
Does that script work for Buzzen?
I haven't tried it for Buzzen, yet. I did test it out yesterday, though. I got an error saying the $input doesn't work in an event. I'll see what else I can come up with. ![]()
Edit: Haven't tried the following code on Buzzen, but I've tested this on Koach.com, and it works. Here is the new code...
on *:TEXT:*:?: {
set %wtext. [ $+ [ $nick ] ] = $nick $+ : $1-
if (!%wnick. [ $+ [ $nick ] ]) {
.msg $nick Waiting for $me to accept whisper. Please wait...
.closemsg $nick
dialog -md waccept. $+ $nick waccept
}
}
on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ]
dialog waccept {
title "Whisper From: "
size -1 -1 134 45
option dbu
button "Yes", 1, 28 31 37 12
button "No", 2, 68 31 37 12
text "", 3, 1 1 131 28
}
on *:dialog:waccept*:*:*: {
tokenize 32 $gettok($dname,2,$asc(.))
if ($devent == init) {
dialog -t $dname Whisper from $1- $+ ?
did -ra $dname 3 Do you want to accept incoming whisper from $1- $+ ?
}
if ($devent == sclick) {
if ($did == 1) {
set %wnick. [ $+ [ $1- ] ] $1-
query %wnick. [ $+ [ $1- ] ]
.msg %wnick. [ $+ [ $1- ] ] Your whisper has been accepted, please continue.
echo %wnick. [ $+ [ $1- ] ] %wtext. [ $+ [ $1- ] ]
dialog -c $dname waccept
}
if ($did == 2) {
.msg $1- Access to whisper has been denied.
closemsg $1-
dialog -c $dname waccept
}
}
}
Nice work, Warrior. But don't you think it's obvious this request was made for Buzzen in the first place? Not to mention this is a Buzzen thread. lol
Amy you have had a whisper decline/accept code for years.
Amy you have had a whisper decline/accept code for years.
Nope never had one ![]()
name='CharmedOne' date='Aug 18 2009, 08:49 PM' post='73514'
Nope never had one
tho one I had for msn was way different wont work here on buzzen
it should work with a little editing.
Get information about ircWx here
Just tested it on Buzzen, and it does work. Here is something else I was working on that you can use too if you wish. It is a combination of the previous code along with a message center addon for when you are away. ![]()
on *:TEXT:*:?: {
;This code will set the incoming text for future use.
set %wtext. [ $+ [ $nick ] ] $nick $+ : $1-
if (!%awaymsg) {
;%awaymsg is used to determine if the code utilizes the Message Center (Used when you are away), or if you're not away it will use the whisper access instead.
if (!%wnick. [ $+ [ $nick ] ]) {
.msg $nick Waiting for $me to accept whisper, please wait...
.closemsg $nick
dialog -md waccept. $+ $nick waccept
}
}
else {
.msg $nick I'm away right now. Your message has been copied, and will be read when I return. Thank you.
write $nofile($mircexe) $+ messages.txt $date(mm/dd/yyyy) $time(hh:nn:ss) %wtext. [ $+ [ $nick ] ]
.closemsg $nick
}
}
on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ]
dialog MSGS {
title "Message Center:"
size -1 -1 341 252
option dbu
list 1, 2 12 89 225, size
text "Messages From:", 2, 2 2 88 8, center
text "Read Message From:", 3, 94 2 244 8, center
list 4, 94 12 244 225, size
button "Close:", 5, -1 240 343 12
}
;The following is used for your Message Center.
on *:dialog:msgs:*:*: {
if ($devent == init) {
:If on init this code will gather a list of names who sent you messages.
var %l = 1
while (%l <= $lines($nofile($mircexe) $+ messages.txt)) {
if (!$didwm($dname,1,$left($gettok($read($nofile($mircexe) $+ messages.txt,%l),3,32),-1))) did -a $dname 1 $left($gettok($read($nofile($mircexe) $+ messages.txt,%l),3,32),-1)
inc %l
}
}
;When you click on each name it will show you a list of messages that person sent you.
if ($devent == sclick) {
if ($did == 1) {
did -r $dname 4
did -ra $dname 2 Messages From: $did(1).seltext
did -ra $dname 3 Read Message From: $did(1).seltext
var %s = 1
while (%s <= $lines($nofile($mircexe) $+ messages.txt)) {
if ($left($gettok($read($nofile($mircexe) $+ messages.txt,%s),3,32),-1) == $did(1).seltext) did -a $dname 4 $chr(40) $+ $gettok($read($nofile($mircexe) $+ messages.txt,%s),1-2,32) $+ $chr(41) $gettok($read($nofile($mircexe) $+ messages.txt,%s),4-,32)
inc %s
}
}
elseif ($did == 5) dialog -c $dname $dname
}
;When you close the Message Center it will ask you if you want to delete all messages. If you click OK it will delete all messages that was sent you.
if ($devent == close) {
if ($input(Do you want to delete your messages?,y,Message Center:) == $true) .remove $nofile($mircexe) $+ messages.txt
}
}
;The following dialog is used just like an $input event. It will ask you if you want to accept an incoming whisper from someone. If you don't want to just click the No button. It will send a message to the person saying their whisper to you has been denied. Otherwise if you accept the whisper it will open the whisper window, and echo what was said. It will also let the person know you have accepted their whisper, and to continue.
dialog waccept {
title "Whisper From: "
size -1 -1 134 45
option dbu
button "Yes", 1, 28 31 37 12
button "No", 2, 68 31 37 12
text "", 3, 1 1 131 28
}
;The following lets your script know whether to use the Message Center when you're away, or not.
raw *:*: {
if ($network != Buzzen) {
if ($numeric == 306) set %awaymsg $true
if ($numeric == 305) {
unset %awaymsg
if ($exists($nofile($mircexe) $+ messages.txt)) dialog -md msgs msgs
}
}
else {
if ($numeric == 822) set %awaymsg $true
if ($numeric == 821) {
unset %awaymsg
if ($exists($nofile($mircexe) $+ messages.txt)) dialog -md msgs msgs
}
}
}
;The following code is used just like an $input event. It will ask you if you want to accept an incoming whisper from someone. If you don't want to just click the No button. It will send a message to the person saying their whisper to you has been denied. Otherwise if you accept the whisper it will open the whisper window, and echo what was said. It will also let the person know you have accepted their whisper, and to continue.
on *:dialog:waccept*:*:*: {
tokenize 32 $gettok($dname,2,$asc(.))
if ($devent == init) {
dialog -t $dname Whisper from $1- $+ ?
did -ra $dname 3 Do you want to accept incoming whisper from $1- $+ ?
}
if ($devent == sclick) {
if ($did == 1) {
set %wnick. [ $+ [ $1- ] ] $1-
query %wnick. [ $+ [ $1- ] ]
.msg %wnick. [ $+ [ $1- ] ] Your whisper has been accepted, please continue.
echo %wnick. [ $+ [ $1- ] ] %wtext. [ $+ [ $1- ] ]
dialog -c $dname waccept
}
if ($did == 2) {
.msg $1- Access to whisper has been denied.
closemsg $1-
dialog -c $dname waccept
}
}
}
To use buzzens whisper accept/deny feature you need to listen to the raw data event.
he wasn't saying it wouldn't work that way.. what travis was saying is that buzzen uses raw data to accomplish what you are doing.
;err0r whispering err0r1885 ;example sending request <- :err0r1885!6492d38d732122c58b44e3fdc3e9e9f3@BuzzenPassport DATA %#err0rtest err0r CMWHISP :WHISPACCEPTNEEDED ;example request accepted <- :err0r1885!6492d38d732122c58b44e3fdc3e9e9f3@BuzzenPassport DATA %#err0rtest err0r CMWHISP :WHISPACCEPTED ;example user declined <- :err0r1885!6492d38d732122c58b44e3fdc3e9e9f3@BuzzenPassport DATA %#err0rtest err0r CMWHISP :WHISPDECLINED ;example user closed query window <- :err0r1885!6492d38d732122c58b44e3fdc3e9e9f3@BuzzenPassport DATA %#err0rtest err0r CMWHISP :WHISPWNDCLOSED
Get information about ircWx here
I've edited the following addon to include information on its functions. Click Here ![]()
Sign in to reply or start a new topic where your account has permission.