|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
menu nicklist {
Notify: {
var %x = 1, %notice = $?="Notice with?"
while (%x <= $snick($active,0)) {
.notice $snick($active,%x) %notice
inc %x
}
}
}
Basically what this does above ^^ I want to highlight a lot of users, and click on "idle" and be able to show all of them, please, you guys are a LOT of help, lol, thanks again.
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
.Notice $1 idle #:notice $1 idle time in # $duration($nick(#,$1).idle)
thats a line from popups for nicklist
see if you can pick up what you can do with that
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
no, what I mean, is I want it to echo everyone's idle time:
Example: × Idle Time for Kurdish_Assass1n: 9mins 3secs
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
that is what I was saying, but whatever sample
alias idlers {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
} CAUTION: Flooding will result if you do a lot of nicks at once.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
MkeChat, thanks a lot, that works good, but, it notices the nicks, sorry if that's what you thought I said: I just want it to do this: if I select the following nicks: Kurdish_Assass1n XBC-BOT Mafia --- and then I click on "idle Time" it'll echo this: × Idle Time for Kurdish_Assass1n: 3mins 57secs × Idle Time for XBC-BOT: 39mins 5secs × Idle Time for Mafia: 20hrs 34mins 21secs and, not for the channel only, for all of the server, if this is possible, please help.
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
1) If you cant figure that out on your own, maybe scripting isnt for you.
2) Server wide can't be done like this, unless you are in the channel with them. If you are a Server Administrator, or an IRCop then you need to learn how to work with that software to get what you want. If you are not Admin or IRCop then you shouldn't be worried about who is idle on the server.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok ok, i'm sorry, nevermind, thanks though. just heard it's not a good idea to use that script.
-Kurdish_Assass1n
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
just heard it's not a good idea to use that script. Im not sure what you mean here... could you explain that?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Performing several whoises I guess.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
Andy, it doesn't use whois
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
He told me he wanted everyones idle from whois, or atleast thats what it sounded like to me.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
He told me he wanted everyones idle from whois, or atleast thats what it sounded like to me. I dont see that in this thread anywhere, so I take it you sent him a message. Certainly a loop with a whois for every nick on a server or network is going to flood you off with only a few nicks. In what I posted all he had to do would be to change the notice to an echo and it would do what he originally asked for. If you think that doing a whois on all users on a server/network is the way to go, I hope for the OP's sake its a small server/network.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
alias idlers {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = [color:blue]$gettok(%idlenicks,0,44)[/color]
while (%i <= %nicktoken) {
var %checknick = [color:blue]$gettok(%idlenicks,%i,44)[/color]
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}}
I understand most of this, i'm just trying to learn how to use these type of scripts. I colored the parts I don't understand, please explain them and how they work, thanks, and honestly, i'm not a bad scripter, just don't know how to use these type of scripts, but, know how to use dialogs and other scripts. thanks
-Kurdish_Assass1n
|
|
|
|
Joined: May 2006
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 32 |
alias idlers {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
the last brackets need moving like here, otherwise you will receive the error * /while: close bracket not found cheers
|
|
|
|
Joined: May 2006
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 32 |
Idlers
.Notice Idler {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Notice me {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
notice $me %checknick = Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Show Channel {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
say %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Window list {
if (!$window(@idlers)) window @idlers
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
aline @idlers [[ $fulldate ]] %checknick = Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
now you can notice the user his idle time send Notice to yourself Send results to the channel open another window and list them (flood safe if doing many) cheers would that be the Kurdish Assasin from Xbox Connect by the way edited and bracket removed
Last edited by RedDevilUK; 09/05/06 05:18 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
alias idlers {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = [color:blue]$gettok(%idlenicks,0,44)[/color]
while (%i <= %nicktoken) {
var %checknick = [color:blue]$gettok(%idlenicks,%i,44)[/color]
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
I understand most of this, i'm just trying to learn how to use these type of scripts. I colored the parts I don't understand, please explain them and how they work, thanks, and honestly, i'm not a bad scripter, just don't know how to use these type of scripts, but, know how to use dialogs and other scripts. thanks I don't see how "scripting dialogs" is any different -------------------------------------------------------------- why didn't you type /help $gettok in the help file: $gettok(text,N,C) Returns the Nth token in text. $gettok(a.b.c.d.e,3,46) returns c $gettok(a.b.c.d.e,9,46) returns $null You can also specify a range of tokens: $gettok(a.b.c.d.e,2-,46) returns 2nd token onwards b.c.d.e $gettok(a.b.c.d.e,2-4,46) returns tokens 2 through 4 b.c.d You can specify a negative value for N. $gettok(string,0,44) in this case will return the number of nicks you selected, see the help for $numtok as it replaces this $numtok(text,C) Returns number of tokens in text. ------------------------------------------ $snicks returns a list of selected nicks delimited by commas nick1,nick2,nick3 $gettok allows you to select one of the nicks based on its position in the string $gettok(nick1,nick2,nick3,2,44) would return nick2 using the while loop you can then check each nickname one at a time for the idle time with the %i increasing each time through the loop $gettok(%idlenicks,%i,44) notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle) change that to echo -a %checknick $+ `s Idle Time in $active $+ : $duration($nick($active,%checknick).idle) and then you will see it echoed, not notice the info to the nick
|
|
|
|
Joined: May 2005
Posts: 449
Fjord artisan
|
Fjord artisan
Joined: May 2005
Posts: 449 |
Nice script. I do have one problem when I run that though. If I choose "Window list", I get this: [ Tue May 09 12:42:01 2006 ] Blake = Idle Time in @idlers:
Looks pretty good otherwise.
|
|
|
|
Joined: May 2006
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 32 |
whoops its me thats messed up with brackets now remove the extra close bracket } at the end it works to the window if you do one user at a time?? but not if you choose many wierd
Last edited by RedDevilUK; 09/05/06 05:12 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
Nice script. I do have one problem when I run that though. If I choose "Window list", I get this: [ Tue May 09 12:42:01 2006 ] Blake = Idle Time in @idlers:
Looks pretty good otherwise. It's what I wrote with minor changes, and the notice me is a bad way to do that, why send the data to the server if you are having the server send it back to you, using echo -a doesn't send the data to the server to be sent back to you. Also he didn't change the $active when he changed it to post to the @window, since that window became the active window its trying to get an idle time for the custom window. repaired
menu nicklist {
Idlers
.Notice Idler {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
notice %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Echo {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
echo 3 -a %checknick $+ 's Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Show Channel {
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
say %checknick Your Idle Time in $active $+ : $duration($nick($active,%checknick).idle)
inc %i
}
}
.Window list {
if (!$window(@idlers)) window @idlers
var %idlenicks = $snicks
var %i = 1
var %nicktoken = $gettok(%idlenicks,0,44)
while (%i <= %nicktoken) {
var %checknick = $gettok(%idlenicks,%i,44)
aline @idlers $+($chr(91),$fulldate,$chr(93)) %checknick $+ 's Idle Time in # $+ : $duration($nick(#,%checknick).idle)
inc %i
}
}
} this is set to be used in remotes, remove the menu { and the last } to use in the popup.ini for the nicklist.
Last edited by MikeChat; 09/05/06 05:25 PM.
|
|
|
|
Joined: May 2006
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 32 |
this is the problem active $+ : $duration the gap is too wide active $+ : $duration that fixes it above scripts now edited too... should work fine now yes its basically your script with bells on cheers for the foundation... and i agree with the echo statement
|
|
|
|
|