mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2005
Posts: 2
A
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Dec 2005
Posts: 2
my script doesnt work as expected. its a ircop application.
alias ircopapp1 {
/msg $$1 Thank you for wanting to apply. Please select a password
on *:MSG:*:?$nick:{
/echo Password for $nick IRCop Application: $1
/msg $nick Password accepted.
}
/msg $nick Please select a username.
on *:MSG:*:?$nick:{
/echo Username for $nick IRCop App: $1
/msg $nick Username accepted. Application complete. Please wait while I do some things. You will be notified in help channel when it is complete.
}
}

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on *:text:!set *:?:{
if ($2 == password) { do something to $$3 | msg $nick your password is now $3 }
if ($2 == username) { do something to $3 | msg $nick your username is now $3 }
}
so they would post to you
!set password (some password)
or
!set username (some username)

Joined: Dec 2005
Posts: 2
A
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Dec 2005
Posts: 2
Now i get 4:26:16 ] · · Error : /on is an unknown command
[ 14:26:17 ] · · Error : /on is an unknown command
also the script:
alias ircopapp1 {
/msg $$1 Thank you for wanting to apply. Please select a Username and password in syntax: username password
on *:text:!set *:?:{
if ($2 == ????????*) { echo pass $2 | msg $nick Password Accepted. $2 }
if ($3 == ????*) { echo user $3 | msg $nick Username Accepted. $3 }
}
}

Last edited by Angel_SL; 20/01/06 06:28 AM.
Joined: Aug 2005
Posts: 24
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 24
On msg events cannot go inside an alias. I moved your commands around and put the on msg by them self

Code:
on *:text:!pass:*:{
  /write c:\Program Files\mIRC\ircopapp.txt $3
  /msg $nick Password accepted.
  /msg $nick Please type !username YourUsername.
}
on *:text:!username:*:{
  /echo Username for $nick IRCop App: $1
  /msg $nick Username accepted. Application complete. Please wait while I do some things. You will be notified in help channel when it is complete.
}

alias ircopapp1 {
  /msg $$1 Thank you for wanting to apply. Please type !pass YourPassword
}


The on TEXT could be combined into one with if statements.
I also changed the msg being sent to reflect the changes I made
!pass triggers the first on msg.
!username triggers the second
however you were calling the alias will still work.

oops! guess I should have checked to see if there was a on msg event :tongue:
changed msg to text
I changed echo in the first on TEXT to write as an example of what mike is talking about doing something with $3

Last edited by DimWatt; 20/01/06 06:54 AM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you are going to have to post your code here;
you must have gotten it tangled with something else.
Also that was not complete, but an example of the event
You had "on msg, there is no "on msg" event
type /help on text
that is the section of the help file you need to go over to start.

I would also look at saving the data (the "do something to $3 part)
I know you are going to code it in to the IRCd if they are IRCOps
but you may want to store the info temporarily til you get it in the conf and rehash


Link Copied to Clipboard