mIRC Home    About    Download    Register    News    Help

Print Thread
#86120 09/06/04 03:37 PM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
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
#86121 09/06/04 03:45 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
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:
#86122 09/06/04 03:55 PM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
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
#86123 09/06/04 04:23 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
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) smile

Last edited by xxxYODAxxx; 09/06/04 04:30 PM.

sometimes these are as bad as quit messages :tongue:
#86124 09/06/04 05:20 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

the following might be what you are looking for.
Code:
  
alias memor { memoserv list }


If you want to read ALL memos (new and old ones) then put in the following event:
Code:
 
on *:NOTICE:*:?: if $nick == MemoServ &amp;&amp; $regex($1,/^\*?(\d+)/) { memoserv read $regml(1) }

If you only want to read the NEW ones, then put in the following:
Code:
 
on *:NOTICE:*:?: if $nick == MemoServ &amp;&amp; $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.
#86125 09/06/04 05:20 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
nice, never thought of it that way. smile (/me "steals" that code)

I wasn't sure if memo was a bot or a service wink (if a bot the way it replied)

I still like yours better laugh


sometimes these are as bad as quit messages :tongue:
#86126 09/06/04 05:26 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hehe,

Note that I edited the code though, I scripted it in a rush.

Cya


Gone.
#86127 09/06/04 05:40 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
hehe, yeah i noticed it.. kinda put me in a loop blush.

the second one doesnt seem to work though. (new memos) maybe its just our services.

anyway still some good stuff laugh


sometimes these are as bad as quit messages :tongue:
#86128 09/06/04 05:44 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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.
#86129 09/06/04 05:58 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
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:
#86130 09/06/04 06:12 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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:
Code:
 
alias memor { memoserv list }

To catch ALL memos (new and old):
Code:

on *:NOTICE:*:?: if $nick == MemoServ &amp;&amp; $regex($1-,/^\*?(\d+)/) { memoserv read $regml(1) } 

To catch NEW memos only:
Code:
  
on *:NOTICE:*:?: if $nick == MemoServ &amp;&amp; $regex($1-,/^\*\s?(\d+)/) { memoserv read $regml(1) } 

That ought to do it grin

Greets


Gone.
#86131 09/06/04 06:32 PM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
that did it laugh

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:
#86132 09/06/04 06:53 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
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.

Link Copied to Clipboard