|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
this code was made by hixxy so its copyright on him ^^
on ^*:notice:*:*:{
if (%nwin == on) {
var %win = $+(@Notice.,$cid,.,$nick)
if (!$window(%win)) window -ek %win
aline %win $+($timestamp,$chr(32),$nick,$iif($target ischan,: $+ $v1),:) $1-
haltdef
}
else { .echo -a $timestamps $theme(notice,$nick,$1-) | halt }
}
on *:input:@:{
if (@notice.*.* iswm $active) {
.notice $gettok($v2,-1,46) $1-
echo -at $me $+ : $1-
}
}
menu @notice.*.* {
Save Log: savebuf 1-200 $active $+(logs\Misc\Notice.,$network,.log)
-
Close: window -c $active
}
anyhows i have few questions regarding this: 1. what does this code do: ,$iif($target ischan,: $+ $v1),:) $1- in 1st part (on notice), i mean why is it added for IF target is channel... in this case it never will be coz everything is in @window no? 2. i changed this: var %win = $+(@Notice.,$cid,.,$nick) to this: var %win = $+(@Notice $+ $chr(160) $+ $nick) coz $chr(32) dont work... but then Event of this does not work: user who supposed to get notice doesnt even get notice
on *:input:@:{
if (@notice* iswm $active) {
.notice $gettok($v2,-1,46) $1-
echo -at $me $+ : $1-
}
}
and this also is not working : (i get only empty name of log but content is there)
menu @notice* {
Save Log: savebuf 1-200 $active $+(logs\Misc\Notices\ $+ $nick $+ .log)
-
Close: window -c $active
}
Anyone can help ? or explain ?
IceCapped
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
1. what does this code do: ,$iif($target ischan,: $+ $v1),:) $1- in 1st part (on notice), i mean why is it added for IF target is channel... in this case it never will be coz everything is in @window no?
That means if you receive a notice from a user that was sent to the channel, instead of directly to you, then the name of the channel would be shown in the line @window.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
1. what does this code do: ,$iif($target ischan,: $+ $v1),:) $1- in 1st part (on notice), i mean why is it added for IF target is channel... in this case it never will be coz everything is in @window no?
That code is for display purposes only. If you receive a private notice, it will be displayed as -nick- text, but if you receive a notice on a channel it will be displayed as -nick:#channel- text, just like mIRC does. 2. i changed this: var %win = $+(@Notice.,$cid,.,$nick)
to this: var %win = $+(@Notice $+ $chr(160) $+ $nick) coz $chr(32) dont work...
on *:input:@:{
if (@notice* iswm $active) {
.notice $gettok($v2,[color:red]2[/color],[color:red]160[/color]) $1-
echo -at $me $+ : $1-
}
}
and this also is not working : (i get only empty name of log but content is there)
menu @notice* {
Save Log: savebuf 1-200 $active $+(",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log")
-
Close: window -c $active
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
hey =) thanks for reply. i still have 2 problems :P 1st issue with that $iif i get 2 notices in 1 row:
(20:19) <|16bit|> some looooong text :#channel some looooong text
and issue with logs: filename is not saved as "nick" but as _nick_ and they all have colorcodes... now dont laugh :P i tried woth strip: savebuf 1-200 $active $+($strip(",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log"),burc) but ofcourse i get errors ¬_¬
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
#1: Post everything you have now (after switching the code I've posted in answer to #2). #2: [color:red]$+([/color][color:blue]$strip([/color]",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log"),burc) Should be: [color:blue]$strip([/color][color:red]$+([/color]",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log"),burc)
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
for $IIF line is this:
aline -k %win $+($timestamps [color:green]$theme(text,$nick,$1-)[/color]), $iif($target ischan,: $+ $v1),:) $1-
disregard things in GREEN, coz i adapted it for my theme system :P as for save buff it still saves in non stripped way with colors
Last edited by raZOR; 19/09/06 06:47 PM.
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
The part in green is what is making it show up twice. aline %win $timestamps $theme(text,$nick,$1-) Why the -k switch in /aline? It doesn't do anything :tongue: As for the colours still being in the log, I thought you meant you wanted them stripped from the filename. Try this instead:
Save Log:{
set %log_file $+(",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log")
filter -rwk 1-200 $active _write
unset %log_file
}
Then you need a _write alias:
alias _write {
if ($isfile(%log_file)) { write %log_file $strip($1) }
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
you were right about that 2x line :P i fuxed it up ^^
as for log, it doesnt save now anything at all o_O
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Try:
Save Log:{
set %log_file $+(",$logdir,Misc\Notices\,$mkfn($gettok($active,2,160)),.log")
if (!$isfile(%log_file)) { write %log_file }
filter -rwk 1-200 $active _write
unset %log_file
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
now it makes log without content =)
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
:tongue:
As long as it's writing the file it should also be filtering the content. I'm not sure what's happening, sorry.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
hehe its ok =)
im gratefull for all you done =)
thanks.
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
darn :P dont shoot me im innocent problem was i renamed alias so it didnt called your _write /me hides =) now it works thanks ^^
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Lol. No problem
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
yay ! i forgot to ask 1 question...
ususaly when something happens in custom window or non custom, it gets highlighted by user selected colour...
but this Notice windows never do get highlighted.
any idea why?
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
After adding the text use window -g1 <window>
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
ahh sweet ! thank you so very much !
IceCapped
|
|
|
|
|