mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Multiple server join script MstrControl 8 hours ago
Dear Bruce,

you're on the right track. I did something similar, but you only need one event.

If you want to auto connect to different servers, this is how I did:

Code
on 1:START: {
  /server first.server.net1
  /server -m second.server.net2
}

on 1:CONNECT: {
  if (*.net1 iswm $server) {
    if ($me == YourNick) {
      /nickserv identify YourNick YourPassword
    } else {
      /nickserv ghost YourNick YourPassword
    }
    /j #YourChannelOnNet1
  }

  if (*.net2 iswm $server) {
    if ($me == YourNick) {
      /nickserv identify YourNick YourPassword
    } else {
      /nickserv ghost YourNick YourPassword
    }
    /j #YourChannelOnNet2
  }

}
1 26 Read More
Scripts & Popups Jump to new posts
Programmatically setting Nicklist size MstrControl 9 hours ago
Greetings,

I've searched the forums and the only reference for the size of Nicklist I found was this.
I'm trying to set up a script that would automatically set the size of Nicklist.
Is there a way to do so?

Regards,
MC
0 14 Read More
Feature Suggestions Jump to new posts
Re: Ignoring un-requested IRCv3 server tags Talon 02/12/22 05:58 AM
I second this feature!

For the time being, here's a scripted fix to maintain a global variable per CID of enabled features, and substitue time= by formatting $gmt if 'server-time' is NOT within the list of 'capabilities' which "should" in theory fix the timestamp in the past/future issue when server time isn't the same as your own. mIRC's internal time features like $gmt and $ctime I believe are all based by your system's clock.

Code
on *:START: { unset $+(%,ircv3.*) }
on *:EXIT: { unset $+(%,ircv3.*) }
on *:DISCONNECT: { unset $+(%,ircv3,.,$cid) }

raw CAP:*: {
  var %Cap = $var($+(%,ircv3,.,$cid),1).value , %Type = $2
  tokenize 32 $3-
  if (%Type = LS) { }
  elseif (%Type = ACK || %Type = NAK) { 
    while ($0) {
      if (-* iswm $1) { var %Cap = $remtok(%Cap,$mid($1,2),1,32) }
      else if (%Type = NAK) { var %Cap = $remtok(%Cap,$1,1,32) }
      else { var %Cap = $addtok(%Cap,$1,32) }
      tokenize 32 $2-
    }
    set $+(%,ircv3.,$cid) %Cap
  }
}

on *:PARSELINE:in:*:{
  var %pl = $parseline
  if ($parseutf) { var %pl = $utfdecode(%pl) }

  ; Replace time= tag with our own localtime if we do not have server-time CAP
  if (!$istok($var($+(%,ircv3,.,$cid),1).value,server-time,32)) { var %pl = $regsubex(%pl,/(^@(?:[^ ]+)?time=)([^ \x3b]+)/,\1 $+ $replace($asctime($gmt,yyyy-mm-dd!HH:nn:ss),!,T) $+ Z) }

  .parseline -itu0 %pl
  return
}

Here's an example of Debug output, testing on a local version of UnrealIRCd, turned on echo message to see the return result
Note: the only "Notable" difference here is the loss of milliseconds but as far as I can tell this doesn't affect anything.
Code
-> irc.example.org @label=0 PRIVMSG #Talon :moo?
<- @label=0;msgid=ewAqCDBZHDZZtQgRW6uI1O;time=2022-12-02T05:25:59.722Z :Talon!Talon@localhost PRIVMSG #Talon :moo?
-> irc.example.org CAP REQ :-server-time
<- :irc.example.org CAP Talon ACK :-server-time
-> irc.example.org @label=0 PRIVMSG #Talon :moo again?
<- @label=0;msgid=fgDLXYglqvS8ExDLALLY95;time=2022-12-02T05:26:21Z :Talon!Talon@localhost PRIVMSG #Talon :moo again?
1 85 Read More
Bug Reports Jump to new posts
Re: Possible base math bug Doomstars 02/12/22 12:11 AM
https://www.mirc.com/versions.txt
10.Extended $base() to handle big numbers.

Thank you.
41 5,901 Read More
Bug Reports Jump to new posts
Re: $bvar(&,N,M).text crashes with N > M Khaled 30/11/22 09:56 AM
Thanks this issue has been fixed for the next version.
1 103 Read More
Feature Suggestions Jump to new posts
Re: elseif == elif maroon 30/11/22 12:11 AM
Google shows that /elif is a 'thing' in python, where apparently they limit elseif to having only 1 of them, while elif is not limited. But we've already got /elif capability with /elseif, and the only thing that adding /elif would do is create a duplicate /command so that scripts are easier to read.

I counter-propose that, instead of creating a new /command that duplicates the functionality of /elseif, and would limit those scripts from running in older versions, that your desired effect could be achieved by having mid-denting of the script, so that if 'else' is preceded by an 'elseif', that the 'else' be followed by at least 2 spaces, and that if 'if' is followed by 'else' but not 'elseif' that the 'if' has 3 trailing spaces, and make it 5 spaces if the 'if' is trailed by an 'elseif'.

Code
if   (foo == bar) { commands }
else { commands }

if     (foo == bar) { commands }
elseif (foo > bar) { commands }
elseif (foo < bar) { commands }
elseif ($me == foo) { commands }
else  { commands }
1 147 Read More
Scripts & Popups Jump to new posts
Re: set background behind status windows Epic 28/11/22 09:38 AM
You can try using these commands:
Code
/background -mf "images\background.jpg"
/background -sf "images\background.jpg"

Depending on where you want to set the background, it can be either the main mIRC window or a status window, or a channel window, etc.

More information here: https://en.wikichip.org/wiki/mirc/commands/background
1 122 Read More
Scripts & Popups Jump to new posts
Re: on memo /on memoserv XGamerAMD 28/11/22 05:40 AM
preciate for the answer!!!!!!!!!!!! thnx
2 139 Read More
Scripts & Popups Jump to new posts
Re: bad nicknames TrioAshburry 27/11/22 11:18 PM
Just some scripting tips from your original post. You should only do the $lines() count one time not every time in a loop,
10 824 Read More
Latest News Jump to new posts
mIRC 7.72 released Khaled 27/11/22 03:14 PM
Dear mIRC User,

mIRC v7.72 has been released today.

This is a small update that adds features and addresses a number of issues reported by users since the last release. It includes improvements, changes and fixes, including:

Added support for big float calculations using MAPM library.
Fixed script parser bug when handling non-while/if { } brackets.
Updated zlib library to v1.2.13.
Fixed !. command prefixes used infront of while/if commands affecting following command.
Added identifiers $cbrt(), $log2(), $powmod(), $modinv(), $gcd(), and $lcm().
Changed confirm paste in a single line editbox to only warn if the line contains CRLF characters.
Fixed script popup menu in menubar not working in fullscreen mode.
Updated OpenSSL library to v1.1.1s.
Changed $totp()/$htop() to improve parameter validation and support longer timestep and digits.
Changed how $bfind().regex matches against a &binvar.
Updated CA root certificates cacert.pem file.
Updated TagLib library to v1.13.

How to upgrade?
mIRC is distributed in an installer that installs mIRC on your computer for you. Simply download and run the installer from the download page on the mIRC website. Follow the instructions the installer gives to you. When upgrading all your old settings and scripts will stay as they were, if you want that. Read the questions the installer asks with care and nothing can go wrong. You will be chatting with the new mIRC in no time. If you get stuck or if you want to find out more about a certain feature, just click on a Help button or browse the Help file and you should find lots of hints to help you out.

Where to download?
As always, the latest version of mIRC can be downloaded from the download page on the mIRC website.

Registering mIRC
As you know, mIRC can be downloaded freely and evaluated for 30 days. If you find that you enjoy using mIRC, it would be great and much appreciated if you registered your copy. This licenses you to use your copy of mIRC and helps to support our continued work on mIRC. You can find out how to register here.

Full list of Fixes, Changes and Additions.
For a more detailed list of recent changes, please see the whatsnew.txt file. You will need to read through the help file to learn more about these changes and their impact. Some changes are obvious, some need getting used to - please take your time to play with them and see how they work. May we invite you to use these forums for all questions you might have? The forums offer great help with everything related to mIRC!

Thanks for using mIRC, have fun on IRC!
0 412 Read More
mIRC Help Jump to new posts
Re: mIRC buttons very small on 4K resolution KindOne 27/11/22 02:36 AM
4 3,120 Read More
mIRC Help Jump to new posts
Re: What is the installer's command line arguments? koitsu 23/11/22 07:37 PM
Thanks so much Khaled!

As for /NODESKTOP not working: turns out I had some old settings in my Chocolatey package install arguments (i.e. I initially installed mIRC via Chocolatey _without_ /NODESKTOP, and since I use choco feature enable -n useRememberedArgumentsForUpgrades, it essentially cached the previous flags). TL;DR -- problem was on my side.
7 8,552 Read More
Scripts & Popups Jump to new posts
Re: Anti text repeats from multiple hosts maroon 22/11/22 06:15 PM
This is starting to turn into something that needs to be more of an in-person discussion, because there will be several issues with that.
Such as how is it supposed to know when to go ahead and send the less-than-6 bans instead of waiting for another. Because you can't know if there will be another repeat until it happens.
Weren't you the one who had a pushmode script that was already doing some of this?
One thing that this system would need to do is remember which bans have been made recently so it doesn't do the ban again if it's same nick doing a repeat, or if it's a 2nd nick matching the same banmask.
etc.
14 2,312 Read More
General Discussion Jump to new posts
Re: log nick userid hostname maroon 22/11/22 02:47 PM
Actually the correct network name for the serverlist 'group' field is what it uses as $network, which for your place is EpicNet.Ru
Since you have a dot in the $network string, users prior to v7.66 may have problems related to
https://forums.mirc.com/ubbthreads.php/topics/268977/server-m-libera-chat
6 755 Read More
Bug Reports Jump to new posts
mIRC beta Khaled 19/11/22 08:56 AM
There are no betas available for testing at this time. Please download the latest version of mIRC from the mIRC website.
1 353,975 Read More
Feature Suggestions Jump to new posts
Re: $ial($me) maroon 17/11/22 02:12 PM
I'm not saying that mIRC is playing 'keepaway' with your own fulladdress, I'm saying that it's standard practice for the IAL to be empty when you're not in any channels. So prior to joining a channel, yes $ial($me) is empty. Leave or get kicked out of $chan(1), and it's empty again.

And the part about scripting this, means that it's not forward-compatible or sideways compatible, while mIRC itself keeps up with the changing ways of how ircd's work. So when a script was written in the version 5.x era had the correct value for $nick, newer mIRC versions continued to have the correct string for $nick while older versions thought that unknown .pnick prefixes like '!' were part of the nick.

Also, for a script to work on all current networks, it would require the script to know about all the different kinds of current networks, which is something I assumed mIRC knew more about than a script could possibly know. So at Libera it would need to monitor raw events ACCOUNT,730,900 and save that info somewhere. At Undernet it would monitor 302 and 396. At networks which have a hostserv there would be something else to monitor, but since I don't have a vhost assigned by anyone's hostserv, I don't know. QuakeNet probably does it an additionally different way, and there are probably a bunch of other ways that a script would need to keep track of things in order to have a scripted self-fulladdress that works at them all.
2 478 Read More
mIRC Help Jump to new posts
Re: How to get /whois dislayed in Status Window helglar4 16/11/22 01:01 PM
Thank you for that!
2 656 Read More
Feature Suggestions Jump to new posts
Re: Additional MAPM Big Integer identifier(s) maroon 15/11/22 06:42 PM
The time for $isbit now beats the scripted mimic. Here's an updated scripted alias for $biton/$bitoff that's 28x faster at 512 bits, and 60x faster at 1024 bits. It just uses $isbit(N) to determine whether to add/subtract 2^(N-1). I didn't include logic to handle negative numbers, but should be similar for those.

Code
alias mapm_biton_bitoff {
  var %bits $int($1) , %t 1
  if (%bits !isnum 100-10000) var %bits 512 
  var %low.bf $calc(2^(%bits - 1)) , %hi.bf $calc(2^%bits) , %rand.bf $rands(%low.bf,%hi.bf)
  var %base2 $base(%rand.bf,10,2)
  echo -ag $count(%base2,1) of $len(%base2) bits are 1's. set $ $+ 2 = 1 to include crc checksum
  var %i %t , %ticks $ticksqpc , %check
  while (%i) {
    var %j %bits
    while (%j) {
      var %a.bf %rand.bf
      var %a.bf $biton(%a.bf,%j)
      if ($2) var %check $crc(%check %a.bf,0)
      dec %j
    }
    dec -s %i
  }
  echo -a style#1: biton time: $calc($ticksqpc - %ticks) %check
  var %i %t , %ticks $ticksqpc , %check
  while (%i) {
    var %j %bits , %a.bf %rand.bf
    while (%j) {
      var %a.bf %rand.bf
      if (!$isbit(%a.bf,%j)) var %a.bf %rand.bf + $calc(2^(%j -1))
      if ($2) var %check $crc(%check %a.bf,0)
      dec %j
    }
    dec -s %i
  }
  echo -a style#2 scripted-biton time: $calc($ticksqpc - %ticks) %check
  var %i %t , %ticks $ticksqpc , %check
  while (%i) {
    var %j %bits
    while (%j) {
      var %a.bf %rand.bf
      var %a.bf $bitoff(%a.bf,%j)
      if ($2) var %check $crc(%check %a.bf,0)
      dec %j
    }
    dec -s %i
  }
  echo -a style#1: bitoff time: $calc($ticksqpc - %ticks) %check
  var %i %t , %ticks $ticksqpc , %check
  while (%i) {
    var %j %bits , %a.bf %rand.bf
    while (%j) {
      var %a.bf %rand.bf
      if ($isbit(%a.bf,%j)) var %a.bf %a.bf - $calc(2^(%j -1))
      if ($2) var %check $crc(%check %a.bf,0)
      dec %j
    }
    dec -s %i
  }
  echo -a style#2 scripted-bitoff time: $calc($ticksqpc - %ticks) %check
}
11 7,301 Read More
Bug Reports Jump to new posts
Re: $hotp() base-32 decoding maroon 15/11/22 03:45 PM
Great, looks like base32 Google Authenticator is working with/without space padding, but a few cases remain:

Quote
digits=10:

//var -s %count 7184224 , %key abcdefghijklmnopqrstuvwxyz234567 | echo -a $hotp(%key,%count,sha1,6) vs $hotp(%key,%count,sha1,9) vs $hotp(%key,%count,sha1,10)

result: 421874 vs 147421874 vs 0737356466
the 10 digits value should be 2147421874

It looks like the truncate31bit is being held in a uint32 which overflowed from division by 10^10, as the result here is $calc( 2147421874 % (10^10 % 2^32 ) )

Probably the simplest way to handle it is like:

truncate31bit = math
if (digits < 10) truncate31bit = truncate31 % 10^digits

Quote
timestep > max

//var %ctime 1234567890 | echo -a $totp(key,%ctime,sha1,6,$calc( 3600*48 )) vs $totp(key,%ctime,sha1,6,$calc( 30 )) vs $totp(key,%ctime,sha1,6,$calc( 3600*48 +1))

result: 904921 vs 336986 vs 336986
should be 904921 vs 336986 vs invalid parm

Defaults are for when a parameter is not used, and just like $hotp(key,0,foobar,11) reject the hashname and digits if not within the accepted range, timestep outside 1-172800 should be an error instead of replacing with 30

Quote
Stripping 0x00 bytes from hex keys

It appears that hex keys are no longer encoding bytes 128-255 as UTF8 text, but are still stripping 0x00 bytes. The example below generates identical %base32 and %hexhex results when the bytes are encoded as either hex or base32, and results match the totp.danhersam.com online template. However if changing 1-or-more of the 1st 19 bytes to 0, the base32 encoding continues to match the template, but %hexhex instead matches the %stripd key where the 0x00 are moved to the tail.

Fixing the handling of bytes 128-255 made 13/14 of random 160-bit hex keys be compatible, but having keys with 0's in different locations being treated as equivalent means that it's something less than 2^160 possible keys, as well as not having compatible results for 1/14th of 160-bit keys.

Code
alias totp_hex_zeroes {
  bset &v 1 195 169 233 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
  var -s %hexhex $regsubex($bvar(&v,1-),/(\d+)/g,$base(\t,10,16,2)) , %stripd $remtok(%hexhex,00,0,32)
  while ($numtok(%stripd,32) < 20) var %stripd %stripd 00 | noop $encode(&v,ba)
  var %base32 $remove($bvar(&v,1-).text,=)
  echo -a base32 $totp(%base32) %base32
  echo -a hexhex $totp(%hexhex) %hexhex
  echo -a stripd $totp(%stripd) %stripd
}
9 4,780 Read More
Bug Reports Jump to new posts
Re: $bfind.regex N>=2 ^ anchor Wims 15/11/22 12:49 PM
Thanks for changing $bfind
3 751 Read More
Scripts & Popups Jump to new posts
Re: /calc Editbox Calculator maroon 14/11/22 11:16 AM
Minor change to the calculator script. The problem affected only the cases where your math matched the kind of /set or /var math that they've done for years. The %result.bf was not being evaluated in bigfloat mode if the command line was: number operator number
... where the operator was any of +-*/^&%
And the fix is changing 1 line:

old:
Code
var %result.bf $calc( [ %1- ] ) , %hex.bf $base(%result.bf,10,16)

new:
Code

var %1-.bf $regsubex($1-,/([\s])/g,$chr(32)) , %result.bf $calc( [ %1-.bf ] ) , %hex.bf $base(%result.bf,10,16)

1 498 Read More
Feature Suggestions Jump to new posts
Re: drawsave to binary maroon 13/11/22 09:20 PM
Strange about the window -f, as the 2nd call only seems to work if the @window is -hidden or -minimized. As soon as the window becomes visible, it widens - possibly to make more of the titlebar visible, and it won't shrink the @window unless you minimize or hide it again.
3 625 Read More
Bug Reports Jump to new posts
SASL PLAIN reply >= 400 maroon 12/11/22 07:03 AM
Someone came into the help channel with a mostly harmless bug they didn't want to report, probably because they didn't want to admit they're trying to use a nickserv password longer than 300

https://ircv3.net/specs/extensions/sasl-3.1#the-authenticate-command

The sasl response should be base64 no longer than 400, with multiple response chunks or a single length 400 reply chased by "AUTHENTICATE +" to say "i'm done"

[InspIRCdx20Testnet] -> testnet.inspircd.org AUTHENTICATE PLAIN
[InspIRCdx20Testnet] <- AUTHENTICATE :+
[InspIRCdx20Testnet] -> testnet.inspircd.org AUTHENTICATE bWFyb29uAG1hcm9vbgB0aGUgcXVpY2sgbWFyb29uIGRvZyBqdW1wcyBvdmVyIHRoZSBsYXp5IGJyb3duIGZveCB0aGUgcXVpY2sgbWFyb29uIGRvZyBqdW1wcyBvdmVyIHRoZSBsYXp5IGJyb3duIGZveHRoZSBxdWljayBtYXJvb24gZG9nIGp1bXBzIG92ZXIgdGhlIGxhenkgYnJvd24gZm94IHRoZSBxdWljayBtYXJvb24gZG9nIGp1bXBzIG92ZXIgdGhlIGxhenkgYnJvd24gZm94IHRoZSBxdWljayBtYXJvb24gZG9nIGp1bXBzIG92ZXIgdGhlIGxhenkgYnJvd24gZm94IHRoZSBxdWljayBtYXJvb24gZG9nIGp1bXBzIG92ZXIgdGhlIGxhenkgYnJvd24gZm94IHRvdGFsbHkgbGVnaXQgcGFzc3dvcmQ=
[InspIRCdx20Testnet] <- :testnet.inspircd.org 905 maroon :SASL message too long

Rats now I have to change my password back to hunter2
0 427 Read More
Bug Reports Jump to new posts
Re: $submenu, 'end' and empty popup Protopia 11/11/22 08:46 PM
Originally Posted by Raccoon
Interrupting raccoon says: "And I'm just over here wishing there was a /popmenu [@]<menu name> [x] [y] so I can show a menu from an alias/event instead of just click/rightclick. Ie: Show a new menu from clicking a menu item. Why? Dynamically created menus that take 5 seconds to load, heavily enumerating nickname / channel / IAL relationships of a particular nickname or channel."

I have not had to do this in mSL, but in other environments the way to deal with this is to do as much processing in advance with a batch process on load and then updating using events, so that when you right click a lot of the work has already been done.
9 636 Read More
Scripts & Popups Jump to new posts
How you can auto-enable TOTP at Undernet maroon 08/11/22 01:48 PM
Here's a way for forum users to use the $totp identifier to take advantage of the "Two-step verification" offered by Undernet for logging into "X", which you can see mentioned in the "My Information" tab when logged into your account at the Undernet website.

This would give you a secret key which you can use to enable more secure logins, and seems to be their compensation for not having SSL connections. This means that when logging in, you would need to give both your text password and also a 6-digit number that changes every 30 seconds. Even if someone knows your password is 'hunter2', they'd still need to have access to the TOTP key that's used to create this 6-digit number.

The 6 digit number is created by combining the TOTP key with the current time - and is the number belonging to a 30-seconds interval that happens on average once per 350 days. Someone who has seen the 6-digit numbers associated with past logins would not be helped in determining the 6-digit number that will work 5 minutes from now, or tomorrow, except by knowing which of the 2^160 possible random keys don't work to generate those digits at those times, and that's not really any effective help.

The problem with the default method that Undernet shows you how to use TOTP - is that it needs you to scan a QR code into your phone, which you would then need to fish out each time you need to use it after getting disconnected.

Instead of using the phone method, you can use mIRC's built-in $totp identifier to send the 6 digit number code, as long as you DELETE the 7 formatting spaces from the secret key Undernet gives you, which this script removes for you. If you've tried and failed to make this work with the $totp identifier in the past, the issue of the space-characters is probably the reason.

A few things to be aware of when deciding if you want to enable TOTP at Undernet:

1. This 6 digit number, in addition to your Undernet account password, is required each time you need to login to your account. This means both after connecting/disconnect/reconnecting to their IRC server, and also when logging into your account at their website. While you can still connect to the IRC server if the code is wrong, X won't login you into the privileges of your IRC account, and you can't get back into the website without using your email address to reset.

2. Since this uses the current time when creating the code, you'll need to make sure your computer's clock doesn't drift too far away from the 'correct time', or else the 'stale' 6-digit number will be rejected.

2a. Though actually, they seem to give you a grace-period window of time, so if they're allowing you to use the number belonging to the 30 second window on either side of the correct time window, there would be 3 codes that could've worked, not just 1. And that means your random 999999 would work once per 4 months instead of once per year. And it would be for a whole 90 seconds.

3. If you lose your TOTP key in a disk fail, you'll need to use your email address to get back into your undernet account, or else wait 6 months for it to expire. And would need to edit the script again with the new TOTP key.

After you modify the alias below to include your actual Undernet account + password + your actual TOTP key, the script below does several things:

A. It will automatically give both your Undernet text password and the TOTP 6-digits each time you connect to Undernet, but does nothing when connecting to a different $network

B. It will create a menu item in your status window which can put the current time's 6-digit number into your clipboard, which is handy for login at their website. This new menu item appears only in the status window's menu that belongs to Undernet.

C. In case the login at the server connect failed because your clock had been wrong and you fixed it, the status window menu can also send your password again, rather than making you disconnect to reconnect again, but only if Undernet is the active $network.

D. If you remove the semi-colon from the line containing the MODE command, it will also send the MODE command which changes your hostname to be like @accountname.users.undernet.org instead of showing your @true-host/ip.

* *

Getting your TOTP secret is easy, by following their website instructions. To obtain the TOTP secret as the text string which you can feed to $totp, instead of scanning their QR symbol to your phone, just click on the link "enter your secret key manually."

Inside that link, they show you the secret key, which is a series of 32 letters and numbers divided by spaces into 8 groups of 4. This is your TOTP secret key that will be used to create the 6-digit number they ask for. This is a secret key which you must protect the same as you protect your login password, and is used in addition to your password, not in place of it. This secret key is not actually a random 'text passphrase', but is a random binary key that's been encoded using case-insensitive base32 where "A" and "a" are the same, and where the optional spaces should be ignored.

In the script where you see lines telling you to replace the 3 strings, the 8 groups of 4 characters is the text that you'll paste as the value defined for %TOT_KEY

Once you edit the script to contain the account/password/TOTP_Key then you're in business. If you don't want to use TOTP at all, you can still use the script to give your password-only to the Undernet server, and to change how your address appears in /whois.

If anyone knows of a different public network like this who also uses TOTP, please let me know!

---
Code
ON *:CONNECT:{ TOTP_6digits Login }

alias -l TOTP_6digits {
  if ($network == Undernet) {

    ; replace the strings for the next 3 string with your personal info
    ; share the original script not the one containing your secrets :)
    ; paste the TOTP key from Undernet website as the value for '%TOTP_KEY'

    ; next line is where you put your Undernet Account name
    var %LoginAccountName replace_with_your_Undernet_account_name
    ; next line is where you put your Undernet Account text password
    var %LOGIN_PASS       replace_with_your_Undernet_account_password
    ; next line is where you put your Undernet TOTP key, the 8 groups of 4 alphanumerics they gave you
    var %TOTP_KEY         replace_this_with_TOTP_secret_key

    var %6digits

    ; change the next line if you do NOT wish to use the TOTP feature but still want help password logging in at Undernet!
    var %Use_TOTP = Yes

    if (%Use_TOTP == Yes) {
      var %TOTP_KEY $remove(%TOTP_KEY,$chr(32))
      if ($regex(foo,%TOTP_KEY,^[a-zA-Z2-7]{32}$)) { var %6digits $totp(%TOTP_KEY) }
      else {
        echo -s $chr(22) Fail: TOTP_KEY should be the 8 groups of 4 digits of given as your TOTP key line: $scriptline script: $nopath($script) | return
      }
      if ($1 == DIGITS) return %6digits
    }
    .msg x@channels.undernet.org login %LoginAccountName %LOGIN_PASS %6digits
    ; *** remove the semi-colon from the following line if you WANT your login address shielded as @accountname.users.undernet.org
    ; .mode $me +x
  }
}

menu status,menubar {
  $iif($network == Undernet,Undernet TOTP)
  .TOTP Undernet 6 digits for Current Time to Clipboard: clipboard $TOTP_6digits(Digits)
  .-
  .TOTP Undernet login now : TOTP_6digits Login
}
0 555 Read More
Page 1 of 14 1 2 3 13 14