|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Hey, I have a code that I made to tell me the nicknames that are online on the network, but it doesn't work on multi-network. mIRC has the Notify List icon with submenu in the toolbar, but I can't get my code to work in multi-network like mIRC does in the toolbar. Anyone who can help me change my code? My code:
menu menubar {
Notify List
.$submenu($notlist($1))
}
alias notlist {
var %t = 1, %c = 2
while ($notify(%t).ison <= %t) {
var %nick = $notify(%t)
if (!$server) && ($1 == 1) return $style(2) None :$null
if ($server) && ($1 == 1) return $style(2) $network $br($server) :$null
if ($1 == %c) && (%c <= 15) return $iif($notify(%t).ison == $true, %nick) :query %nick
if ($1 == 16) && (%t >= 15) return More... :notify -s
inc %c
inc %t
}
}
My code:mIRC Notify List:I've tried to change my code to work in the same way as the mIRC Notify List but I can't. If anyone here can help me, I'd be grateful!
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
I forgot to put the $br identifier that I created in the code.
alias br { return $+($lbr,$1-,$rbr) }
alias lbr { return $chr(40) }
alias rbr { return $chr(41) }
Thank you KindOne for calling my attention!
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
menu menubar {
Notify List
.$submenu($notlist($1))
}
alias notlist {
if (%notlistnone) {
unset %notlistnone
return $style(2) None : noop
}
if ($1 !isnum) return
if (!%notlistservcount) {
%notlistservcount = 1
%notlistcount = 1
}
scon %notlistservcount
if ($status == connected) {
if (%notlistcount == 1) var %r $style(2) $network $br($server) : noop
elseif ($notify($calc(%notlistcount - 1))) {
if (%notlistcount isnum 2-16) var %r $iif($notify($calc(%notlistcount - 1)).ison,$notify($calc(%notlistcount - 1)) : scon % $+ notlistservcount query $notify($calc(%notlistcount - 1)))
else return More... : scon % $+ notlistservcount notify -s
}
else goto next
if (%r) {
inc %notlistcount
return %r
}
}
else {
:next
if ($status != connected) && (%notlistcount == 1) set -u %notlistnone 1
if (%notlistservcount == $scon(0)) {
unset %notlistservcount %notlistcount
return
}
inc %notlistservcount
%notlistcount = 1
return -
}
}
Last edited by Wims; 03/03/22 04:55 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Hi Wims Thanks for helping. I tested your code but the result is this: This is not the intended result. What I would like was something similar to what mIRC itself already does. What I want is for the name of all networks and servers to which I am connected and the respective online nicknames of each network to appear in the same menu. Hug
Last edited by TECO; 03/03/22 02:57 PM.
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
I edited the code, some things were missing and some things were incorrect, I tested it so that it should display the server disabled in the menu, I don't have any nick in the notify list but it should work better.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims Thank you The result is this: But the code still has a problem. When I choose a nickname from another network, the code opens a query on the wrong network. And also writes in the query. Thank you for your help!
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims I tested now to be connected to 3 networks and the code stops working, the Notify List menu is disabled.
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
I edited the code again to fix the query opening on the wrong connection.
When there is an error or something wrong happens, the global variables %notlistservcount and %notlistcount are not unset correctly, this makes the next attempts moot, makes sure to unset the two variables from the variables tab in the editor before trying.
How many status window do you have? Which one is connected? How many nick do you have in notify list per server?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Hi Wims I made a video so you can see what the problem is. At this moment the code does not open the query of any nickname. When I connect to more than 2 networks the code stops working. Video: Notify ListThank you for your help
Last edited by TECO; 03/03/22 05:31 PM.
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
I fixed more issues, I tested with one nickname this time. alias notlist {
if (%notlistnone) {
unset %notlistnone
return $style(2) None : noop
}
if ($1 !isnum) return
if (!%notlistservcount) {
%notlistservcount = 1
%notlistcount = 1
}
scon %notlistservcount
if ($status == connected) {
if (%notlistcount == 1) var %r $style(2) $network $br($server) : noop
else {
while ($notify($calc(%notlistcount - 1)).ison == $false) inc %notlistcount
if ($notify($calc(%notlistcount - 1))) {
if (%notlistcount isnum 2-16) var %r $iif($notify($calc(%notlistcount - 1)).ison,$notify($calc(%notlistcount - 1)) : scon %notlistservcount query $notify($calc(%notlistcount - 1)))
else return More... : scon %notlistservcount notify -s
}
else goto next
}
if (%r) {
inc %notlistcount
return %r
}
}
else {
:next
if ($status != connected) && (%notlistcount == 1) set -u %notlistnone 1
if (%notlistservcount == $scon(0)) {
unset %notlistservcount %notlistcount
scon -r
return
}
inc %notlistservcount
%notlistcount = 1
return -
}
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims, now i think everything is working. It's no longer a problem when I'm connected to more than 2 networks. But only one small detail is missing. The 16 nickname limit is not working and (More...) is not appearing.
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
Seems fine to me, the limit is 16 per connection, you're never reaching that limit here so it shouldn't be showing "more".
If you want 16 nicknames limit overall and you don't want to show anything else after "more", then please state it.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims I'm sorry, but I thought you were aware of how the mIRC Notify List works and mIRC puts a general limit and not a per-network limit. But I apologize if I didn't mention that
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
I never used the notify list, here is an update for 16 items, server and nickname included + one item for "more":
alias notlist { if (%notlistnone) { return $style(2) None : noop } if (%notlistmore) { return $v1 } if ($1 !isnum) return if (!%notlistservcount) { set -u %notlistservcount 1 set -u %notlistcount 1 set -u %notlistmorecount 1 } scon %notlistservcount if ($status == connected) { if (%notlistcount == 1) var %r $style(2) $network $br($server) : noop else { while ($notify($calc(%notlistcount - 1)).ison == $false) inc %notlistcount if ($notify($calc(%notlistcount - 1))) var %r $iif($notify($calc(%notlistcount - 1)).ison,$notify($calc(%notlistcount - 1)) : scon %notlistservcount query $notify($calc(%notlistcount - 1))) else goto next } if (%r) { inc %notlistcount inc %notlistmorecount if (%notlistmorecount == 18) { set -u %notlistmore More... : notify -s scon -r return } return %r } } else { :next if ($status != connected) && (%notlistcount == 1) set -u %notlistnone 1 if (%notlistservcount == $scon(0)) { scon -r return } inc %notlistservcount %notlistcount = 1 return - } }
Last edited by Wims; 03/03/22 09:56 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims, now everything is working. I apologize if I didn't mention that detail and I didn't know you had never used the mIRC Notify List. Thank you for everything and for your patience! I am very grateful to you!
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims can you add that it returns "none" when I'm disconnected from all networks?
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
alias notlist {
if (%notlistmore) {
return $v1
}
if (%notlistnone) return $v1
if ($1 !isnum) return
if (!%notlistservcount) {
set -u %notlistservcount 1
set -u %notlistcount 1
set -u %notlistmorecount 1
}
scon %notlistservcount
if ($status == connected) {
if (%notlistcount == 1) var %r $style(2) $network $!!br($server) : noop
else {
while ($notify($calc(%notlistcount - 1)).ison == $false) inc %notlistcount
if ($notify($calc(%notlistcount - 1))) var %r $iif($notify($calc(%notlistcount - 1)).ison,$notify($calc(%notlistcount - 1)) : scon %notlistservcount query $notify($calc(%notlistcount - 1)))
else goto next
}
if (%r) {
inc %notlistcount
inc %notlistmorecount
if (%notlistmorecount == 18) {
set -u %notlistmore More... : notify -s
scon -r
return
}
return %r
}
}
else {
inc -u %sconcocount
:next
if (%notlistservcount == $scon(0)) {
if (%sconcocount == $scon(0)) set -u %notlistnone $style(2) None : noop
scon -r
return
}
inc %notlistservcount
%notlistcount = 1
return -
}
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332 |
Wims, great. Thank you for all. Hug
TECO irc.PTirc.org (Co-Admin)
|
|
|
|
|