mIRC Home    About    Download    Register    News    Help

Print Thread
remote command functions #143878 03/03/06 03:51 AM
Joined: Dec 2004
Posts: 33
W
WildCard Offline OP
Ameglian cow
OP Offline
Ameglian cow
W
Joined: Dec 2004
Posts: 33
i am usally away from home but i would like my home computer to join, part, change nick, kick, ban etc... only a few commands. i do not want to install a bot script. the command would be in msg. like this:
!nick WildCard <<to change nick to wildcard>>
!part #channel
!join #channel
!identify password

how would this be scripted on my home computer? if i can get the basic function i can just copy and paste for each command. thank you for your time

Re: remote command functions #143879 03/03/06 04:25 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
/help on text

-genius_at_work

Re: remote command functions #143880 03/03/06 05:01 AM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
All commands sent through private message/query. The code goes in remote scripts (alt + r).

You may need to change the red colored text. I just assume the network you are on uses NickServ, if not then change it as needed.

At the bottom is a commented out skeleton code for adding another command. It should be easy to figure out. Be sure to remove the semi-colons if copying the code.

Code:
on *:TEXT:*:?:{
  [color:green]; !join #channel / !part #channel[/color]
  if ($regex($2,/^#[\S]/)) {
    if ($1 == !join) {
      if ($me !ison $2) join $2
      else .msg $nick I am already on $2
    }
    if ($1 == !part) {
      if ($me ison $2) part $2
      else .msg $nick I am not on $2
    }
  }
  [color:green]; !nick &lt;new-nick&gt;[/color]
  if ($1 == !nick) {
    if ($2 &amp;&amp; $regex($2,/^[a-zA-Z\[\]\{\}\\`^]/)) { nick $2 }
    else .msg $nick Invalid nick.
  }
  [color:green]; !identify[/color]
  if ($1 == !identify) .msg [color:red]NickServ identify nick pass[/color]

  [color:green]; if ($1 == !new-command) {
  ; do stuff here
  ; }[/color]
}

Re: remote command functions #143881 04/03/06 10:02 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
you should rather use elseif instead of if's here...

mIRC will try and evaluate all the if's you put in here what is useless, it should stop at the one it was looking for...


so:

if
elseif
elseif
elseif
else

is a much better construction


If it ain't broken, don't fix it!