|
Joined: Oct 2003
Posts: 306
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2003
Posts: 306 |
alias memor {
var %i = 1 while (%memo <= 10) { echo 2 %memo .msg memo read %memo if %memo == null return .inc %memo }
i made this ,but i hear suggestions
thnx
mess with the best
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
I dont follow what your doing..? var %i is created but not used? Can you give a hint to what your trying to accomplish?
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Oct 2003
Posts: 306
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2003
Posts: 306 |
yea i forgot to erase the %i var , i need a loop to read all the memos
thnx
mess with the best
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
alias memor { var %i = 1 while (%i <= %memo) { if (%memo == 0) || (%memo == $null) { return } else { .msg memo read %i inc %i } } } that should work, however youll have to set %memo as a timed var or global var prior to this alias in something like an on event which runs this alias. like: on *:connect:{ .msg memo new } on *:text:*WHATEVER MEMO SAYS HERE*:*:{ set -u5 %memo $___ (<-postion of the message amt) memor } that what ya mean? -cheers EDIT: memo probably is a notice. and the -u5 may need to be a little longer to prevent an infinate loop (or add a check for that also)
Last edited by xxxYODAxxx; 09/06/04 04:30 PM.
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi, the following might be what you are looking for.
alias memor { memoserv list }
If you want to read ALL memos (new and old ones) then put in the following event:
on *:NOTICE:*:?: if $nick == MemoServ && $regex($1,/^\*?(\d+)/) { memoserv read $regml(1) }
If you only want to read the NEW ones, then put in the following:
on *:NOTICE:*:?: if $nick == MemoServ && $regex($1,/^\*(\d+)/) { memoserv read $regml(1) } So type /memor and you'll see all your memos. Greets Note: You cannot choose both, it's either the first event or the second event. So either you have the script read ALL memos, or only the new ones.
Last edited by FiberOPtics; 09/06/04 05:58 PM.
Gone.
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
nice, never thought of it that way. (/me "steals" that code) I wasn't sure if memo was a bot or a service (if a bot the way it replied) I still like yours better
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hehe,
Note that I edited the code though, I scripted it in a rush.
Cya
Gone.
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
hehe, yeah i noticed it.. kinda put me in a loop . the second one doesnt seem to work though. (new memos) maybe its just our services. anyway still some good stuff
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hmm weird, I tested both notices on DALnet, all worked.
Note that you can't have those 2 on notice events in the same script file.
That might explain why the second notice event didn't trigger. Try putting them in seperate files, or put a ; in front of the first one. So you gotta choose either of the two events, can't have both.
Greets
Gone.
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
both are in script editor and yes i did use ; dunno no biggie.
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Ah yes, it's network specific. On DALnet: *1 Blabla On Rizon: * 1 Blabla Kinda hard to know how it's gonna be on other networks, but this should cover both then:
alias memor { memoserv list }
To catch ALL memos (new and old):
on *:NOTICE:*:?: if $nick == MemoServ && $regex($1-,/^\*?(\d+)/) { memoserv read $regml(1) } To catch NEW memos only:
on *:NOTICE:*:?: if $nick == MemoServ && $regex($1-,/^\*\s?(\d+)/) { memoserv read $regml(1) } That ought to do it Greets
Gone.
|
|
|
|
Joined: Mar 2004
Posts: 108
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 108 |
that did it thx.. what i ended up with: alias memoa { set -u10 %memoserv all | memoserv list } alias memon { set -u10 %memoserv new | memoserv list } on *:NOTICE:*:?:{ if %memoserv == all && $nick == MemoServ && $regex($1,/^(?:\*)?(\d+)/) { memoserv read $regml(1) } if %memoserv == new && $nick == MemoServ && $regex($1-,/^\*\s?(\d+)/) { memoserv read $regml(1) } }
sometimes these are as bad as quit messages :tongue:
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Yep,
that's a good way to use it as a final script. Could be very useful for some people who're wondering about such a thing. Nice.
Cya Yoda
Gone.
|
|
|
|
|