|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
alias -l w return $+(@,notice,.,$1)
alias -l theme.notice {
return 6<2 $+ $iif($prop,$1 $+ 6> notices to 6<2 $+ $3,$1) $+ 6>1: $iif($prop,$4-,$3-)
}
on &^*:notice:*:*:{
if ($nick != Chanserv) && ($nick != Nickserv) && ($nick != Memoserv) {
window $+(-e,$iif($window($w($nick)),a)) $w($nick)
echo $w($nick) $theme.notice($nick,$address($nick,2),$1-)
haltdef
}
else { echo -a $theme.notice($nick,$address,$1-) | haltdef }
}
on *:input:@notice.*:{
if ($left($1,1) != $readini($mircini,text,commandchar)) {
.notice $gettok($active,2,46) $1-
.echo $active $theme.notice($me,$address,$gettok($active,2,46),$1-).me
}
} <xyzzy>: hello <Away> notices to <xyzzy>: hi that how at @notice page i want reply as <Away>: hi remove ' notices to <xyzzy> ' and also want to code wont work when chanserv nickserv notices me any idea pls
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
A little rewrite of your code, I left out all unused parts in alias theme.notice. It's working with nickserv etc for me (that is: it does not create a separate @notice.nick window, but it does "theme" the nick in the display of the received notices - dunno if that is what you want) If you still have issues with nickserv etc, try putting the script higher in "load order". alias -l theme.notice {
return $+($chr(3),06<,$chr(3),02,$1,$chr(3),06>,$chr(15) $2-)
}
on &^*:notice:*:?: {
if (!$istok(Chanserv Nickserv Memoserv,$nick,32)) {
var %w = $+(@,notice,.,$nick)
window $iif($window(%w),-a,-e) %w
}
echo $iif($window(%w),%w,-a) $theme.notice($nick,$1-)
haltdef
}
on *:input:@notice.*:{
if ($left($1,1) != $readini($mircini,text,commandchar)) {
.notice $gettok($active,2,46) $1-
echo $target $theme.notice($me,$1-)
}
}
on *:nick: {
if ($window($+(@notice.,$nick))) { renwin $v1 $+(@notice.,$newnick) }
}
on *:quit: {
if ($window($+(@notice.,$nick))) { echo $v1 $nick quitted $network $+ : $1- }
}
raw 401:*: {
if ($window($+(@notice.,$2))) {
echo $v1 $2-
haltdef
}
} Note that I added an "on nick" event, an "on quit" event and a raw event: 1) If the user changes his/her nick and shares a comchan with you, the script will rename the respecive @notice.nick-window (you can keep on using this window). 2) If the user changes his/her nick and is not sharing a common channel, or the nick is quitting, your mIRC won't notice this event. If you now try to send a notice to that nick, you'll receive an error message - this error message is now displayed in the notice window too. 3) If the user quits the network (and you share a common channel), you'll see this in the notice window as well.
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
good work but the part services notices I want that the code functions only if theres a user notice(ignoring the nickserv and chanserv notices in tht code, but receive cs and ns notices as usual ) without opening an extra window, if it wouyld be perfect to open the notice window simply with the right click on the nick.. thx in advance.
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
To have Notices of Chanserv Nickserv Memoserv passing the script untouched (no "themed" echo), use this on notice event instead of the one in the code above: on &^*:notice:*:?: {
if (!$istok(Chanserv Nickserv Memoserv,$nick,32)) {
var %w = $+(@,notice.,$nick)
window $iif($window(%w),-a,-e) %w
echo %w $theme.notice($nick,$1-)
haltdef
}
} And if you want all notices of all nicks passing the script unchanged, as long as you did not open a notice window yourself, use this on notice event instead: on &^*:notice:*:?: {
if ($window($+(@notice.,$nick))) {
window -a $v1
echo $v1 $theme.notice($nick,$1-)
haltdef
}
} To open/close the notice window for a nick via popups (right-click on the nick in a channel/nicklist), add this to your code: menu nicklist {
$iif(($window($+(@notice.,$$1))),Close,Open) Notice window with $$1 : window $iif(($window($+(@notice.,$$1))),-c,-e) $+(@notice.,$$1)
}
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
well done thank you so much take good care pls
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
ok got some problems abt the code when im at pvt or channel it jumps the opened notice page i dont want that can i keep pvt or channel as well ? also if i didnt open notice page manuel from popups i dont want code open it auto
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
Hum, hope I get you right this time. The notice windows will no longer "pop up" if a notice goes there. Instead, the dafault beep/flash/highlight settings are applied. Here's the complete code with the modifications: ; notice event: if a notice is received from a nick that has an associated notice
; window: add the notice to that window. (default beep/flash/strip/highlight settings)
on &^*:notice:*:?: {
if ($window($+(@notice.,$nick))) {
echo -bflrt $v1 $theme.notice($nick,$1-)
haltdef
}
}
; input event: send the input as notice to nick
on *:input:@notice.*:{
if ($left($1,1) != $readini($mircini,text,commandchar)) {
.notice $gettok($active,2,46) $1-
echo -t $target $theme.notice($me,$1-)
}
}
; alias for themed display in notice window
alias -l theme.notice {
return $+($chr(3),06<,$chr(3),02,$1,$chr(3),06>,$chr(15) $2-)
}
; nick change event: if theres an associated notice window for nick, change window name
on *:nick: {
if ($window($+(@notice.,$nick))) { renwin $v1 $+(@notice.,$newnick) }
}
; quit event: if theres an associated notice window for nick, display quit info there
on *:quit: {
if ($window($+(@notice.,$nick))) { echo -tlc info $v1 * $nick quits $network $+ : $1- }
}
; a nick with an associated notice window is no longer online: show "no such nick" error in that window
raw 401:*: {
if ($window($+(@notice.,$2))) {
echo -tlc info $v1 * $2-
haltdef
}
}
; nick popup: open/close notice window for nick
menu nicklist {
$iif(($window($+(@notice.,$$1))),Close,Open) Notice window with $$1 : {
window $iif(($window($+(@notice.,$$1))),-c,-eCk0z) $+(@notice.,$$1) -1 -1 350 150
}
}
; popup at notice window: close notice window
menu @notice.* {
Close this notice window : window -c $active
$iif(($window(@notice.*,0) > 1),Close all open notice windows $+([,$v1,])) : close -@ @notice.*
}
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
awesome thanks a lot
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
Hello again, Can we auto logging these notice conversation
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
/help /write
and you should find everything you need.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
Thats not help also if im good on the mirc coding why need asking here ? Anyone else pls can help me
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
on &^*:notice:*:?: {
if ($window($+(@notice.,$nick))) {
echo -bflrt $v1 $theme.notice($nick,$1-)
write $qt($mircdirlogs\noticelog.log) $+($time $nick,$chr(58),$1-)
haltdef
}
}
change the path to the one you want it to be.. this one will store it in your log folder inside mirc. write $qt( $mircdirlogs\noticelog.log) $+($time $nick,$chr(58),$1-)
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2006
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Nov 2006
Posts: 143 |
thank you works well
|
|
|
|
|