Basically what this is is a profile system for mIRC which allows you to easily allow more than one person use one irc client or if you have multiple nicks with different info for each of them this will allow you to easily change information it should be self explanatory once it's open if you have questions ask this was a forum request by @unseen it's not 100% completed i plan to tweak it a bit and make it better but it is fully functional as is
Menu Menubar,Nicklist,Channel {
.Mirc profile system: dialog $iif($dialog(mircprofile.system),-v,-md mircprofile.system) mircprofile.system
}
Dialog mircprofile.system {
Title "mircprofilesystem"
Size -1 -1 146 86
Option dbu
list 1, 02 02 90 90, hsbar vsbar
Button "add" ,2, 94 02 50 10, autohs
Button "login" ,3, 94 14 50 10, autohs
Button "edit" ,4, 94 26 50 10, autohs
}
on *:Dialog:mircprofile.system:*:*: {
if ($devent == init) {
set %usernames $readini(mircprofile.ini, users, loginnames)
testwhile
}
if ($devent == sclick) {
if ($did == 2) {
openeditor
.dialog -x mircprofile.system
}
if ($did == 3) {
if (!$did(1).sel) {
noop $input(Please select a profile to log into from the list)
}
else { var %vartest $?="what's your pw"
if (%vartest == $readini(mircprofile.ini, $did(1).seltext ,Pass)) {
.set %mircprofile $did(1).seltext
.nick $readini(mircprofile.ini, %mircprofile ,nick))
.anick $readini(mircprofile.ini, %mircprofile ,altnick))
.emailaddr $readini(mircprofile.ini, %mircprofile ,Email))
.identd on $readini(mircprofile.ini, %mircprofile ,ident))
if ($readini(mircprofile.ini, %mircprofile ,serveraddy)) {
.server -m $readini(mircprofile.ini, %mircprofile ,serveraddy))
}
}
}
}
if ($did == 4) {
if (!$did(1).sel) {
noop $input(Please select a profile to edit into from the list)
}
else {
.set %editprofile $did(1).seltext
set %vartest $?="what's your pw"
if (%vartest == $readini(mircprofile.ini, $did(1).seltext ,Pass)) {
.set %mircprofile $did(1).seltext
openeditor
.dialog -x mircprofile.system
}
}
}
}
}
alias openeditor { dialog -v,-md profeditor.system profeditor.system }
Dialog profeditor.system {
Title "mircprofileeditor"
Size -1 -1 55 97
Option dbu
edit "Enter real name" ,1, 02 02 50 10, autohs
edit "Enter email" ,2, 02 12 50 10, autohs
edit "Enter ident" ,3, 02 22 50 10, autohs
edit "Enter nick " ,4, 02 32 50 10, autohs
edit "Enter alt nick" ,5, 02 42 50 10, autohs
edit "Enter server addy" ,6, 02 52 50 10, autohs
edit "Enter server pw" ,7, 02 62 50 10, autohs
Button "save" ,9, 02 74 50 10, autohs
Button "delete" ,10, 02 86 50 10, autohs
}
on *:Dialog:profeditor.system:*:*: {
if ($devent == init) {
if (%editprofile) {
.did -r profeditor.system 1-7
.did -a profeditor.system 1 %editprofile
.did -a profeditor.system 2 $readini(mircprofile.ini, %editprofile ,Email))
.did -a profeditor.system 3 $readini(mircprofile.ini, %editprofile ,ident))
.did -a profeditor.system 4 $readini(mircprofile.ini, %editprofile ,nick))
.did -a profeditor.system 5 $readini(mircprofile.ini, %editprofile ,altnick))
.did -a profeditor.system 6 $readini(mircprofile.ini, %editprofile ,serveraddy))
.did -a profeditor.system 7 $readini(mircprofile.ini, %editprofile ,Pass))
}
}
if ($devent == sclick) {
if ($did == 9) {
.set %usernames $addtok(%usernames, $did(1).text ,44)
.timer 1 2 addprofnick
writeini mircprofile.ini $did(1).text email $did(2).text
writeini mircprofile.ini $did(1).text ident $did(3).text
writeini mircprofile.ini $did(1).text nick $did(4).text
writeini mircprofile.ini $did(1).text altnick $did(5).text
writeini mircprofile.ini $did(1).text serveraddy $did(6).text
writeini mircprofile.ini $did(1).text pass $did(7).text
}
if ($did == 10) {
remini mircprofile.ini $did(1).text
set %usernames $remtok(%usernames, $did(1).text ,44)
.timer 1 2 addprofnick
}
}
if ($devent == close) {
.unset %editprofile
.unset %mircprofile
.unset %vartest
}
}
alias openmircprofsystem { dialog -v,-md mircprofile.system mircprofile.system }
alias addprofnick {
if (!%usernames) {
remini mircprofile.ini users
.dialog -x profeditor.system
openmircprofsystem
.unset %editprofile
.unset %mircprofile
}
else {
.writeini -n mircprofile.ini users loginnames %usernames
.dialog -x profeditor.system
openmircprofsystem
.unset %editprofile
.unset %mircprofile
}
}
alias testwhile {
var %a = 1, %b = $numtok(%usernames,44)
while (%a <= %b) {
did -a mircprofile.system 1 $gettok(%usernames,%a,44)
inc %a
}
}
------------------------------------------------------------------------
Menu Menubar,Nicklist,Channel {
.Mirc profile system: dialog $iif($dialog(mircprofile.system),-v,-md mircprofile.system) mircprofile.system
}
Dialog mircprofile.system {
Title "mircprofilesystem"
Size -1 -1 146 86
Option dbu
list 1, 02 02 90 90, hsbar vsbar
Button "add" ,2, 94 02 50 10, autohs
Button "login" ,3, 94 14 50 10, autohs
Button "edit" ,4, 94 26 50 10, autohs
}
on *:Dialog:mircprofile.system:*:*: {
if ($devent == init) {
set %usernames $readini(mircprofile.ini, users, loginnames)
testwhile
}
if ($devent == sclick) {
if ($did == 2) {
openeditor
.dialog -x mircprofile.system
}
if ($did == 3) {
if (!$did(1).sel) {
noop $input(Please select a profile to log into from the list)
}
else {
.set %mircprofile $did(1).seltext
.nick $readini(mircprofile.ini, %mircprofile ,nick))
.anick $readini(mircprofile.ini, %mircprofile ,altnick))
.emailaddr $readini(mircprofile.ini, %mircprofile ,Email))
.identd on $readini(mircprofile.ini, %mircprofile ,ident))
if ($readini(mircprofile.ini, %mircprofile ,serveraddy)) {
.server -m $readini(mircprofile.ini, %mircprofile ,serveraddy))
}
}
}
if ($did == 4) {
if (!$did(1).sel) {
noop $input(Please select a profile to edit into from the list)
}
else {
.set %editprofile $did(1).seltext
set %vartest $?="what's your pw"
if (%vartest == $readini(mircprofile.ini, $did(1).seltext ,Pass)) {
.set %mircprofile $did(1).seltext
openeditor
.dialog -x mircprofile.system
}
}
}
}
}
alias openeditor { dialog -v,-md profeditor.system profeditor.system }
Dialog profeditor.system {
Title "mircprofileeditor"
Size -1 -1 55 97
Option dbu
edit "Enter real name" ,1, 02 02 50 10, autohs
edit "Enter email" ,2, 02 12 50 10, autohs
edit "Enter ident" ,3, 02 22 50 10, autohs
edit "Enter nick " ,4, 02 32 50 10, autohs
edit "Enter alt nick" ,5, 02 42 50 10, autohs
edit "Enter server addy" ,6, 02 52 50 10, autohs
edit "Enter server pw" ,7, 02 62 50 10, autohs
Button "save" ,9, 02 74 50 10, autohs
Button "delete" ,10, 02 86 50 10, autohs
}
on *:Dialog:profeditor.system:*:*: {
if ($devent == init) {
if (%editprofile) {
.did -r profeditor.system 1-7
.did -a profeditor.system 1 %editprofile
.did -a profeditor.system 2 $readini(mircprofile.ini, %editprofile ,Email))
.did -a profeditor.system 3 $readini(mircprofile.ini, %editprofile ,ident))
.did -a profeditor.system 4 $readini(mircprofile.ini, %editprofile ,nick))
.did -a profeditor.system 5 $readini(mircprofile.ini, %editprofile ,altnick))
.did -a profeditor.system 6 $readini(mircprofile.ini, %editprofile ,serveraddy))
.did -a profeditor.system 7 $readini(mircprofile.ini, %editprofile ,Pass))
}
}
if ($devent == sclick) {
if ($did == 9) {
.set %usernames $addtok(%usernames, $did(1).text ,44)
.timer 1 2 addprofnick
writeini mircprofile.ini $did(1).text email $did(2).text
writeini mircprofile.ini $did(1).text ident $did(3).text
writeini mircprofile.ini $did(1).text nick $did(4).text
writeini mircprofile.ini $did(1).text altnick $did(5).text
writeini mircprofile.ini $did(1).text serveraddy $did(6).text
writeini mircprofile.ini $did(1).text pass $did(7).text
}
if ($did == 10) {
remini mircprofile.ini $did(1).text
set %usernames $remtok(%usernames, $did(1).text ,44)
.timer 1 2 addprofnick
}
}
if ($devent == close) {
.unset %editprofile
.unset %mircprofile
.unset %vartest
}
}
alias openmircprofsystem { dialog -v,-md mircprofile.system mircprofile.system }
alias addprofnick {
if (!%usernames) {
remini mircprofile.ini users
.dialog -x profeditor.system
openmircprofsystem
.unset %editprofile
.unset %mircprofile
}
else {
.writeini -n mircprofile.ini users loginnames %usernames
.dialog -x profeditor.system
openmircprofsystem
.unset %editprofile
.unset %mircprofile
}
}
alias testwhile {
var %a = 1, %b = $numtok(%usernames,44)
while (%a <= %b) {
did -a mircprofile.system 1 $gettok(%usernames,%a,44)
inc %a
}
}
hello,
as for the delete function, yea I've seen it, sorry it was my bad,
but also would be good if it was out on the main panel, and multi profile select to be possible in case somebody has lots of profiles and wants to filter it.
on the other hand, the server pass I believe is the one of the psybnc / bnc password is. but whenever u click on a profile and press on login,
you receive a box where it asks for a password, and in this case I believe the server pass maybe.
So I was thinking about this specific box that appears after clicking on login. why does it appear ? and if it's possible for it to be removed.
that's because I have lots of shell profiles. and it will be more practical as a fast login.
Kindly let me know if there's more details needed :)
Best regards
Thanks again for the snippet :)
since you're going to do few more tweaks, few things should be added or being optional.
your efforts are most appreciated :)
Best regards