Author Topic: Protection Scripts  (Read 33459 times)

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #30 on: August 01, 2008, 01:05:37 AM »
try viewing the MyHost variable inside the for loop (that is, echo it to the screen) to see what it returns, from then you can try to figure out what might be wrong
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #31 on: August 01, 2008, 09:06:47 AM »
I used
Code: [Select]
SendCommand "/echo -s " & myhost,ServerNumber
accidentally between
MyHost = GetIdentifier("$mask(" & FullMask & "," & N & ")",ServerNumber)
and
if LCase(mode) = "+b " & LCase(MyHost) then,
so the command is send in any case- it returns $null   (x10times)
i don't understand why it doesn't have some value  :?

After that, i put it in the IF statement under the line
'if LCase(mode) = "+b " & LCase(MyHost) then' i had one to ban me
and it didn't return anything at all
so i guess the IF code isn't executed lol i wonder why...


DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #32 on: August 01, 2008, 09:11:46 AM »
Correction:(x11times) :-D...not that it matters any  :-P

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Protection Scripts
« Reply #33 on: August 01, 2008, 02:38:33 PM »
Looks like the big guy (That would be Mr Snerf) is going to have to step in, and make this script himself :)

I will see what I can muster up.
The IceChat God

SniperPro

  • Newbie
  • *
  • Posts: 44
  • Have no fear! SniperPro is here! ;D
    • Myspace
Re: Protection Scripts
« Reply #34 on: August 02, 2008, 10:32:57 AM »
Can you make this where it doesen't matter what level I am (% threw ~) I -b myself and ban+kick the user who did it saying "Don't ban me"?

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #35 on: August 02, 2008, 11:42:16 AM »
Code: [Select]
Sub ONMODE(Channel,ModeSetter,Mode,ServerNumber)
If ModeSetter = GetIdentifier("$me") then exit sub
if LCase(mode) ="-o " & LCase(mynickname) then
SendCommand "/msg chanserv op " & channel & " " & MyNickName,ServerNumber
end if
End Sub

Code: [Select]
Sub ONKICK(Nickname,Host,Channel,WhoKicked,Reason,ServerNumber)
if Nickname = GetIdentifier("$me") then
SendCommand "/msg chanserv unban " & channel & " " & MyNickName,ServerNumber
SendCommand "/timer 1 1 2 /join " & channel,ServerNumber
SendCommand "/timer 2 1 3 /mode " & channel & " +b " & WhoKicked &" !*@*",ServerNumber
end if
End Sub

Together with the anti-ban don't forget the anti-deop and anti-kick  :-D.Those two above work fine - too bad i can't make them allow my buddies to deop or kick meh if they want but since you are warmed up  :lol:

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #36 on: August 05, 2008, 12:21:24 AM »
Quote
MyHost = GetIdentifier("$mask(" & FullMask & "," & N & ")",ServerNumber)

that's the problem right there I think. You don't need the ',ServerNumber'
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #37 on: August 05, 2008, 08:19:33 AM »
It still returns null for it

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #38 on: August 05, 2008, 10:01:41 AM »
Hmm, it seems like the $fullhost identifier is a bit buggy. It returns odd stuff on some networks.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Protection Scripts
« Reply #39 on: August 05, 2008, 10:03:02 AM »
I tested the script on Quakenet and had no problems with it.
The IceChat God

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #40 on: August 05, 2008, 10:12:10 AM »
that's the thing, it works on quakenet, because that network returns the $fullhost identifier as it should. But ircnet returns only your nick, and irc.nexuswar.com returns "services."
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #41 on: August 05, 2008, 10:51:16 AM »
I mostly go to IrCQnet (irc.icq.com),
where the host mask is cloaked (mode +x).

this works for me there (the one Morio suggested):

Code: [Select]
MyNick = GetIdentifier("$me",ServerNumber)
MyHost = GetIdentifier("$nick(" & Channel & "," & MyNick & ").host",ServerNumber)
MyHost = Mid(MyHost,inStr(MyHost,"@")+1)
if LCase(mode) = "+b *!*@" & LCase(MyHost) then
SendCommand "/mode " & channel & " -b *!*@" & myhost,ServerNumber
SendCommand "/kick " & channel & " " & modesetter & " Do Not Ban Me",servernumber
        SendCommand "/mode " & channel & " +b " & modesetter &" !*@*",ServerNumber
end if

,it counters only one type of ban so i tried the $fullhost identifier.Till now it returns null value for me  :|

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #42 on: August 05, 2008, 11:16:16 AM »
use this to get your host:
Code: [Select]
MyNick = GetIdentifier("$me",ServerNumber)
MyHost = GetIdentifier("$nick(" & Channel & "," & MyNick & ").host",ServerNumber)
MyHost = Mid(MyHost,inStr(MyHost,"@")+1)

then use the 'For' loop with the $mask identifier
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

DocBeat

  • Newbie
  • *
  • Posts: 43
Re: Protection Scripts
« Reply #43 on: August 05, 2008, 11:37:20 AM »


Sorry i don't understand where and y to use the $mask identifier if i already got MyHost with other code.

MyHost = GetIdentifier("$mask(" & FullMask & "," & N & ")",ServerNumber)
This one you mean?-i guess not since i already get MyHost with the code you gave me.
Also what will the FullMask be if the $fullhost identifier is buggy for icq server  :?

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Protection Scripts
« Reply #44 on: August 05, 2008, 11:51:22 AM »
the $mask identifier only modifies the host you pass through it

Code: [Select]
MyNick = GetIdentifier("$me",ServerNumber)
MyHost = MyNick & "!" & GetIdentifier("$nick(" & Channel & "," & MyNick & ").host",ServerNumber)
For i = 0 to 10
CurrentHost = GetIdentifier("$mask(" & MyHost & "," & i & ")")
SendCommand "/echo -a " & CurrentHost
Next
« Last Edit: August 05, 2008, 11:54:40 AM by Morio »
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein