Page 1 of 1

Can someone make me a mirc code

Posted: Sun Oct 09, 2005 6:28 am
by Mike M
Hi can someone please make me a mirc code so when a user joins a channel the user with the code checks if ithe users vhost is host and +o it?

Posted: Sun Oct 09, 2005 11:09 am
by sChutt

Code: Select all

on *:join:#:{ /whois $nick
  if ( %host == insert.which.host.you.wanna.check ) { //mode $chan +o $nick
  }
}

raw 311:*:{
  haltdef
  set %host $4
}
That should do the trick.

- §

Posted: Sun Oct 09, 2005 12:12 pm
by Mike M
thanks works

i was also wondering how can i make it +o a user if there host has got Ninechat_Host into it? so it will +o users wiht mike.ninechat_host or bob.ninechat_Host

Posted: Sun Oct 09, 2005 12:22 pm
by sChutt

Code: Select all

on *:join:#:{ /whois $nick
  if ( Ninechat_Host isin %host  ) { //mode $chan +o $nick
  }
}

raw 311:*:{
  haltdef
  set %host $4
}
That'll do then.

- §

Posted: Sun Oct 09, 2005 1:17 pm
by Mike M
also is there a code so when a user connects to the server it changes there nickname to Host_

Posted: Sun Oct 09, 2005 6:39 pm
by Stealth
sCutt, you're code is over-complicated.

Code: Select all

on *:JOIN:#:{ if ($address($nick,2) == *!*@host.to.be.opped) { mode # +o $nick } }
Or, the way he wants it:

Code: Select all

on *:JOIN:#:{ if (ninechat_Host isin $address($nick,2)) { mode # +o $nick } }

Posted: Sun Oct 09, 2005 10:59 pm
by Mike M
no i dont want it doing it when they join a channel when they first connect to the server without joining the room my bot changes there nick to Host_$nick

Posted: Sun Oct 09, 2005 11:51 pm
by aquanight
This isn't really a mIRC help forum, but since I'm feeling nice.

Code: Select all

on *:SNOTICE:*Client connecting*:{
    if ($6-7 == on port || ($6 == at && . isin $7)) {
      ;Normal connect snotice. Nick is $8
      chghost $8 host. $+ $8
    }
    else if ($5 == Connecting:) {
      ;HCN - nick is $6
      chghost $6 host. $+ $6
    }
}
I must point out that some remnant of the real host should remain because when you use a system like that, you remove the usefulness of hostname banning and replace it with the insecurity of nick-based banning (because when you mode +b a user he could simply reconnect with a new nick).

Posted: Sun Oct 09, 2005 11:53 pm
by aquanight
Oh and Stealth: YOUR code is over complicated!

Code: Select all

/aop on
/aop nick!user@host.mask.to.be.autoopped #channel nameofyournetworkhere

Posted: Sat Oct 15, 2005 11:07 am
by Mike M
how about a code that does this:

When a user identifies with nickserv and there vhost is disabled.ninechat i want my bot to kill the user.

Posted: Sat Oct 15, 2005 1:34 pm
by Solutech
cant you do that with an akill from services ? . Are you talking a broad ban or specific user ? .

Posted: Sat Oct 15, 2005 2:20 pm
by Mike M
i dont want to do it that way

Posted: Sat Oct 15, 2005 6:07 pm
by Solutech
I can appreciate doing it through a bot but if the bot drops then bang goes your protection . Services is a much better solution imo . Why go to the effort of coding something that already exists ? . Failing that check out some of the numerous chan bots already written you may be able to snip the code out you need .

Posted: Sun Oct 16, 2005 5:04 am
by Mike M
i can kline a hostname right if i can whats the code to do it

Posted: Sun Oct 16, 2005 11:08 am
by Solutech
depends how you want to do it , via a popup or alias . You may be better off looking for a specific oper script that already has all this sort of thing in it .