|
Joined: Mar 2005
Posts: 46
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 46 |
Can anyone help with this code I have, it isnt working on *:notify:{
if (%ghstog) {
if ($nick iswm $ini($+(",$scriptdiraid.ini,"),$network,$nick)) && ($nick != $me) {
set %ghstnick $nick
ghost
}
}
}
on *:notice:*:*:{
if ($nick == nickserv) && (*killed* iswm $1-) {
nick %ghstnick
unset %ghstnick
}
}
alias ghost { nickserv ghost %ghstnick $readini($+(",$scriptdiraid.ini,"),$network,%ghstnick)) }
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Hey dude, do you have an interface to go with that adding nicknames etc like you had with Auto-Identify or is that the lot?
All the best,
-Andy.
|
|
|
|
Joined: Mar 2005
Posts: 46
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 46 |
yeah its part of that script, i just added a on/off toggle for the autoghost function, and the code shown above. should i post the rest of the script too?
Last edited by Pariah; 01/05/05 04:54 AM.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Could do, might be easier. 
|
|
|
|
Joined: Mar 2005
Posts: 46
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 46 |
dialog aid {
title "AIDv2.2"
size -1 -1 80 129
option dbu
list 1, 2 15 50 100, size
edit "", 2, 2 2 50 10, autohs
button "Add", 3, 53 1 26 12
button "Remove", 4, 53 16 26 12
button "Clear All", 5, 53 29 26 12
button "OK", 6, 2 116 37 12, ok
button "Cancel", 7, 41 116 37 12, cancel
menu "Config", 8
menu "On/Off", 9, 8
item "On", 14, 9
item break, 15, 9
item "Off", 16, 9
item break, 10, 8
menu "Ident Method", 12, 8
item "Nickserv", 13, 12
item break, 18, 12
item "On Connect", 17, 12
item break, 11, 8
item "Help", 19, 8
item break, 20, 8
item "About", 21, 8
}
on *:dialog:aid:init:0:{
$iif(%aidtog,did -c aid 14,did -c aid 16)
$iif(%methtog.1,did -c aid 13,did -u aid 13)
$iif(%methtog.2,did -c aid 17,did -u aid 17)
var %totl = $ini($+(",$scriptdiraid.ini,"),$network,0)
while (%totl) {
did -a aid 1 $ini($+(",$scriptdiraid.ini,"),$network,%totl) $readini($+(",$scriptdiraid.ini,"),$network,$ini($+(",$scriptdiraid.ini,"),$network,%totl))
dec %totl
}
}
on *:dialog:aid:sclick:3:{
if ($did(aid,2) != $null) {
if ($chr(32) !isin $did(aid,2)) { echo -a Read the Help Please. (Click Config > Help) }
else { did -a aid 1 $did(aid,2) | writeini $+(",$scriptdiraid.ini,") $network $gettok($did(aid,2),1,32) $gettok($did(aid,2),2,32) | did -r aid 2 }
}
}
on *:dialog:aid:sclick:4:{
if ($did(aid,1).sel) {
var %sel.num = $did(aid,1).sel
var %sel.txt = $did(aid,1).seltext
did -d aid 1 %sel.num
remini $+(",$scriptdiraid.ini,") $network $gettok(%sel.txt,1,32)
}
}
on *:dialog:aid:sclick:5:{ did -r aid 1 | remini aid.ini $network }
on *:dialog:aid:menu:14:{
if (!%aidtog) { set %aidtog on | did -u aid 16 }
did -c aid 14
}
on *:dialog:aid:menu:13:{
if (%methtog.2) { unset %methtog.2 | did -u aid 17 }
did -c aid 13
set %methtog.1 on
}
on *:dialog:aid:menu:16:{
if (%aidtog) { unset %aidtog | did -u aid 14 }
did -c aid 16
}
on *:dialog:aid:menu:17:{
if (%methtog.1) { unset %methtog.1 | did -u aid 13 }
did -c aid 17
set %methtog.2 on
}
on *:notice:*:*:{
if ($nick == nickserv) && (*registered*and*protected* iswm $1-) {
if (%aidtog) && (%methtog.1) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
}
menu status,channel {
AIDv2.2
.Configure:aid
.-
.On/Off
..AutoIdent
...$iif(%aidtog,$style(1)) On:set %aidtog on
...-
...$iif(!%aidtog,$style(1)) Off:unset %aidtog
..AutoGhost
...$iif(%ghstog,$style(1)) On:set %ghstog on
...-
...$iif(!%ghstog,$style(1)) Off:unset %ghstog
.Method
..$iif(%methtog.1,$style(1)) Nickserv:set %methtog.1 on | unset %methtog.2
..-
..$iif(%methtog.2,$style(1)) On Connect:set %methtog.2 on | unset %methtog.1
}
alias aid dialog -dm aid aid
;On Connect Option
;I've left the nickserv identify command here, you can easily change the command to suit your needs.
on *:connect:{
if (%aidtog) && (%methtog.2) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
;AutoGhost Function
on *:notify:{
if (%ghstog) {
if ($nick iswm $ini($+(",$scriptdiraid.ini,"),$network,$nick)) && ($nick != $me) {
set %ghstnick $nick
ghost
}
}
}
on *:notice:*:*:{
if ($nick == nickserv) && (*killed* iswm $1-) {
nick %ghstnick
unset %ghstnick
}
}
alias ghost { nickserv ghost %ghstnick $readini($+(",$scriptdiraid.ini,"),$network,%ghstnick)) }
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
As before dude, I believe it's a problem with the wildcard matching and $ini().
dialog aid {
title "AIDv2.2"
size -1 -1 80 129
option dbu
list 1, 2 15 50 100, size
edit "", 2, 2 2 50 10, autohs
button "Add", 3, 53 1 26 12
button "Remove", 4, 53 16 26 12
button "Clear All", 5, 53 29 26 12
button "OK", 6, 2 116 37 12, ok
button "Cancel", 7, 41 116 37 12, cancel
menu "Config", 8
menu "On/Off", 9, 8
item "On", 14, 9
item break, 15, 9
item "Off", 16, 9
item break, 10, 8
menu "Ident Method", 12, 8
item "Nickserv", 13, 12
item break, 18, 12
item "On Connect", 17, 12
item break, 11, 8
item "Help", 19, 8
item break, 20, 8
item "About", 21, 8
}
on *:dialog:aid:init:0:{
$iif(%aidtog,did -c aid 14,did -c aid 16)
$iif(%methtog.1,did -c aid 13,did -u aid 13)
$iif(%methtog.2,did -c aid 17,did -u aid 17)
var %totl = $ini($+(",$scriptdiraid.ini,"),$network,0)
while (%totl) {
did -a aid 1 $ini($+(",$scriptdiraid.ini,"),$network,%totl) $readini($+(",$scriptdiraid.ini,"),$network,$ini($+(",$scriptdiraid.ini,"),$network,%totl))
dec %totl
}
}
on *:dialog:aid:sclick:3:{
if ($did(aid,2) != $null) {
if ($chr(32) !isin $did(aid,2)) { echo -a Read the Help Please. (Click Config > Help) }
else { did -a aid 1 $did(aid,2) | writeini $+(",$scriptdiraid.ini,") $network $gettok($did(aid,2),1,32) $gettok($did(aid,2),2,32) | did -r aid 2 }
}
}
on *:dialog:aid:sclick:4:{
if ($did(aid,1).sel) {
var %sel.num = $did(aid,1).sel
var %sel.txt = $did(aid,1).seltext
did -d aid 1 %sel.num
remini $+(",$scriptdiraid.ini,") $network $gettok(%sel.txt,1,32)
}
}
on *:dialog:aid:sclick:5:{ did -r aid 1 | remini aid.ini $network }
on *:dialog:aid:menu:14:{
if (!%aidtog) { set %aidtog on | did -u aid 16 }
did -c aid 14
}
on *:dialog:aid:menu:13:{
if (%methtog.2) { unset %methtog.2 | did -u aid 17 }
did -c aid 13
set %methtog.1 on
}
on *:dialog:aid:menu:16:{
if (%aidtog) { unset %aidtog | did -u aid 14 }
did -c aid 16
}
on *:dialog:aid:menu:17:{
if (%methtog.1) { unset %methtog.1 | did -u aid 13 }
did -c aid 17
set %methtog.2 on
}
on *:dialog:aid:menu:19:{
echo -s -----
echo -s AIDv2 Help
echo -s Enter Username and Password into the editbox seperated by a space.
echo -s Hit the Add button ... Your Username and Password are now saved.
echo -s Remember to make sure you have AIDv2 enabled otherwise it will not Identify automatically.
echo -s -----
}
on *:dialog:aid:menu:21:{
echo -s -----
echo -s AIDv2 by Pariah
echo -s 12http://beam.to/pariah
echo -s -----
}
on *:notice:*:*:{
if ($nick == nickserv) && (*registered*and*protected* iswm $1-) {
if (%aidtog) && (%methtog.1) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
}
menu status,channel {
AIDv2.2
.Configure:aid
.-
.On/Off
..AutoIdent
...$iif(%aidtog,$style(1)) On:set %aidtog on
...-
...$iif(!%aidtog,$style(1)) Off:unset %aidtog
..AutoGhost
...$iif(%ghstog,$style(1)) On:set %ghstog on
...-
...$iif(!%ghstog,$style(1)) Off:unset %ghstog
.Method
..$iif(%methtog.1,$style(1)) Nickserv:set %methtog.1 on | unset %methtog.2
..-
..$iif(%methtog.2,$style(1)) On Connect:set %methtog.2 on | unset %methtog.1
}
alias aid dialog -dm aid aid
on *:connect:{
if (%aidtog) && (%methtog.2) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
;AutoGhost Function
on *:notify:{
if (%ghstog) {
if ([color:red]$+(*,$nick,*))[/color] iswm [color:red]$readini([/color]$+(",$scriptdiraid.ini,"),$network,$nick)) && ($nick != $me) {
set %ghstnick $nick
ghost
}
}
}
on *:notice:*:*:{
if ($nick == nickserv) && (*killed* iswm $1-) {
nick %ghstnick
unset %ghstnick
}
}
alias ghost { nickserv ghost %ghstnick $readini($+(",$scriptdiraid.ini,"),$network,%ghstnick)) }
|
|
|
|
Joined: Mar 2005
Posts: 46
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 46 |
seriously man, i promise one day i'll actually remember to use *'s for wildmatches.  thanks slade, i appreciate it 
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You're welcome.  Aslong as you keep that promise, everything will be fine hehe. Nice script by the way, 10 out of 10.
|
|
|
|
Joined: Mar 2005
Posts: 46
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2005
Posts: 46 |
well that wasnt the only problem, $readini($+(",$scriptdiraid.ini,"),$network,$nick) returned the wrong thing, and i had two seperate on *:notice:*:*: events. i believe i got it all in working order now... let me know if theres anything i can do to improve it. dialog aid {
title "AIDv2.2"
size -1 -1 80 129
option dbu
list 1, 2 15 50 100, size
edit "", 2, 2 2 50 10, autohs
button "Add", 3, 53 1 26 12
button "Remove", 4, 53 16 26 12
button "Clear All", 5, 53 29 26 12
button "OK", 6, 2 116 37 12, ok
button "Cancel", 7, 41 116 37 12, cancel
menu "Config", 8
menu "On/Off", 9, 8
item "On", 14, 9
item break, 15, 9
item "Off", 16, 9
item break, 10, 8
menu "Ident Method", 12, 8
item "Nickserv", 13, 12
item break, 18, 12
item "On Connect", 17, 12
item break, 23, 8
menu "AutoGhost", 22, 8
item "On", 24, 22
item break, 25, 22
item "Off", 26, 22
item break, 11, 8
item "Help", 19, 8
item break, 20, 8
item "About", 21, 8
}
;Events
on *:dialog:aid:init:0:{
$iif(%aidtog,did -c aid 14,did -c aid 16)
$iif(%methtog.1,did -c aid 13,did -u aid 13)
$iif(%methtog.2,did -c aid 17,did -u aid 17)
$iif(%ghst,did -c aid 24,did -c aid 26)
var %totl = $ini($+(",$scriptdiraid.ini,"),$network,0)
while (%totl) {
did -a aid 1 $ini($+(",$scriptdiraid.ini,"),$network,%totl) $readini($+(",$scriptdiraid.ini,"),$network,$ini($+(",$scriptdiraid.ini,"),$network,%totl))
dec %totl
}
}
on *:dialog:aid:sclick:3:{
if ($did(aid,2) != $null) {
if ($chr(32) !isin $did(aid,2)) { echo -a Read the Help Please. (Click Config > Help) }
else { did -a aid 1 $did(aid,2) | writeini $+(",$scriptdiraid.ini,") $network $gettok($did(aid,2),1,32) $gettok($did(aid,2),2,32) | .notify $gettok($did(aid,2),1,32) | did -r aid 2 }
}
}
on *:dialog:aid:sclick:4:{
if ($did(aid,1).sel) {
var %sel.num = $did(aid,1).sel
var %sel.txt = $did(aid,1).seltext
did -d aid 1 %sel.num
remini $+(",$scriptdiraid.ini,") $network $gettok(%sel.txt,1,32)
}
}
on *:dialog:aid:sclick:5:{ did -r aid 1 | remini aid.ini $network }
on *:dialog:aid:menu:14:{
if (!%aidtog) { set %aidtog on | did -u aid 16 }
did -c aid 14
}
on *:dialog:aid:menu:13:{
if (%methtog.2) { unset %methtog.2 | did -u aid 17 }
did -c aid 13
set %methtog.1 on
}
on *:dialog:aid:menu:16:{
if (%aidtog) { unset %aidtog | did -u aid 14 }
did -c aid 16
}
on *:dialog:aid:menu:17:{
if (%methtog.1) { unset %methtog.1 | did -u aid 13 }
did -c aid 17
set %methtog.2 on
}
on *:dialog:aid:menu:19:{
echo -s -----
echo -s AIDv2 Help
echo -s Enter Username and Password into the editbox seperated by a space.
echo -s Hit the Add button ... Your Username and Password are now saved.
echo -s Remember to make sure you have AIDv2 enabled otherwise it will not Identify automatically.
echo -s -----
}
on *:dialog:aid:menu:21:{
echo -s -----
echo -s AIDv2 by Pariah
echo -s 12http://beam.to/pariah
echo -s -----
}
on *:dialog:aid:menu:24:{
if (!%ghst) { set %ghst on | did -u aid 26 }
did -c aid 24
}
on *:dialog:aid:menu:26:{
if (%ghst) { unset %ghst | did -u aid 24 }
did -c aid 26
}
on *:notice:*:*:{
if ($nick == nickserv) {
if (*registered*and*protected* iswm $1-) {
if (%aidtog) && (%methtog.1) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
if (*killed* iswm $1-) {
nick %ghstnick
unset %ghostnick
}
}
}
on *:connect:{
if (%aidtog) && (%methtog.2) {
if ($ini($+(",$scriptdiraid.ini,"),$network)) && ($ini($+(",$scriptdiraid.ini,"),$network,$me)) {
nickserv identify $readini($+(",$scriptdiraid.ini,"),$network,$me)
}
}
}
on *:notify:{
if (%ghst) {
set %ghstnick $nick
var %y = $ini($+(",$scriptdiraid.ini,"),$network,0)
if ($+(*,$nick,*) iswm $ini($+(",$scriptdiraid.ini,"),$network,%y) && ($nick != $me)) {
ghost
}
}
}
;Aliases
alias ghost { nickserv ghost %ghstnick $readini($+(",$scriptdiraid.ini,"),$network,%ghstnick)) }
alias aid dialog -dm aid aid
;Popups
menu status,channel {
AIDv2.2
.Configure:aid
.-
.On/Off
..AutoIdent
...$iif(%aidtog,$style(1)) On:set %aidtog on
...-
...$iif(!%aidtog,$style(1)) Off:unset %aidtog
..AutoGhost
...$iif(%ghstog,$style(1)) On:set %ghstog on
...-
...$iif(!%ghstog,$style(1)) Off:unset %ghstog
.Method
..$iif(%methtog.1,$style(1)) Nickserv:set %methtog.1 on | unset %methtog.2
..-
..$iif(%methtog.2,$style(1)) On Connect:set %methtog.2 on | unset %methtog.1
}
|
|
|
|
|