IPB

Welcome Guest ( Log In | Register )

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

2 Pages V  1 2 >  
Reply to this topicStart new topic
> [RESOLVED]Channel Password Requierment, make chpw accept pw in say and /w
Spiritless
post Aug 8 2009, 09:41 AM
Post #1


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Ok, I am using chpw for my clan channel, I would like to know if someone can make me a similar script. This is what the script would feature diffrent form chpw...

Timeban using timeban plugin instead of perma-ban. (maybe have it increase time banned when a user fails to enter the password multiple times, and eventually after 3 timebans a perma-ban.)

Ability to set the messages when players join and are asked for the password, when the password is accepted, and when the user is timebanned/banned form the channel.

Accept the password in regular channel chat and /whisper

(optional) Remember what users have typed the password within last 12hrs, so they must only type it once every 12hrs. (Allow the time the password is remembered for users) **Does not need to remember passwords typed whent he bot reconnects/reloads script/is closed and the re-opened**

Here are the commands I think would need to be in the script:

.pass on <password to requier> - Turn the plugin on, all users that join after the plugin is on will requier the password
.pass delay <time given tot he user before they are timebanned/banned> - Sets the amount of time each user is given to type the password.
.pass remember <time (in hours) to remember if a user has typed the password already> - Sets the time (in hours) to remember what users have typed the password.
.pass off - Turns the plugin off, users that join will no-longer be required to type the password. *OPTIONAL: Resets the list of users that have typed the password in the given 'remember' time.*
*OPTIONAL* .pass safe on/off - Turns safelist user exemption on/off. Off means safelisted users must give the password


If someone could make this for me please do! =D I know i sometimes try to over-simplify and i get confusing, so if you have a quesiton about the request feel free to ask. =D


Thank you!


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 06:27 PM
Post #2


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



I'm guessing noone wants/can do this?
(kinda obv bump but it's been a while since first post)


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 06:56 PM
Post #3


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Search?


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 09:44 PM
Post #4


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Thanks for the direct link, but I am having problems with this.
QUOTE

[8:31:20 PM] -- MyTestBot@USWest [-1ms] has joined the channel using Starcraft Brood War (0 wins).
[8:31:21 PM] <To MyTestBot@USWest> Spiritless_LoF@USWest, you have 15 seconds to whisper the Bot the channel's password.(/r <password>)
[8:31:22 PM] <MySBbot MyTestBot@USWest, a Lord of Flame, has entered the channel with a ping of -1. Welcome MyTestBot@USWest, Don't forget to log onto the site! wwwmyclansite.tk>
[8:31:35 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[8:31:35 PM] Error Number: 438 Description: Object doesn't support this property or method
[8:31:36 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[8:31:36 PM] Error Number: 438 Description: Object doesn't support this property or method
[8:31:37 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[8:31:37 PM] Error Number: 438 Description: Object doesn't support this property or method
[8:31:38 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[8:31:38 PM] Error Number: 438 Description: Object doesn't support this property or method


I first tried editing a few things in the plugin(not a good idea starting off with a new plugin I know, but I was only changing minor things i thought wouldn't hurt the plugin. When I got these errors. I undid all my changes, then tried it again. Same thing.
(I did Reload Script when i undid changes)

Heres the original script, after that the one i edited.

CODE
'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF" '// Your Clan Tag
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 15 '// Time (in seconds) users have to enter the password before they are booted
Const cchpw_punishment = "kick" '// If they do not supply the password, will they be kicked or banned?

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.", Username,

vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If cchpwUsers.Exists(Username) Then
If Message = cchpw_password Then
cchpwUsers.Remove Username
Dsp 3, "Password accepted. Inviting...", Username, vbGreen
Command BotVars.Username, "/invite " & Username, True
Call Event_PressedEnter("/promote " & Usename)
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
Command BotVars.Username, "/" & cchpw_punishment & " " & users(i) & " Password incorrect.", True
cchpwUsers.Remove users(i)
End If
Next
End Sub

^^Original

CODE
'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF" '// Your Clan Tag
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 15 '// Time (in seconds) users have to enter the password before they are booted
Const cchpw_punishment = "timeban 30" '// If they do not supply the password, will they be kicked or banned?

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.", Username,

vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If cchpwUsers.Exists(Username) Then
If Message = cchpw_password Then
cchpwUsers.Remove Username
Dsp 3, "Password accepted.", Username, vbGreen
(here I took out the auto-invite things, because I didn't want that feature.)
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
Command BotVars.Usename, "/w My_Ops_Bot ." & cchpw_punishment & " " & users(i) & " Password incorrect.", True
cchpwUsers.Remove users(i)
End If
Next
End Sub


^^Edited


With that last change, I do not use my SB for ops, i use NF. So I edit all my kick/ban and plugin kick/ban/timeban cmds to go to the NF bot.

Since I got the same error with botht he original and the edited script, I believe it is a problem with the script or the bot, not my changes.

(I DO have the plugin system script and all my other plugins work)
If you type the wrong password, nothing happens, if you type the right password, then it says password accepted, invites you, and dnt kick u

This post has been edited by The-Black-Ninja: Aug 23 2009, 09:52 PM


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 09:57 PM
Post #5


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Username is mispelt here:
CODE
Command BotVars.Usename, "/" & cchpw_punishment & " " & users(i) & " Password incorrect.", True


I've fixed it in my original and the original in your post. As for your edit, you can't call the timeban like that, you have to say:
CODE
Call Event_PressedEnter("/timeban " & whatever syntax is used to timeban someone)


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 10:14 PM
Post #6


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



QUOTE(The-Black-Ninja @ Aug 23 2009, 10:57 PM) *

Username is mispelt here:
CODE
Command BotVars.Usename, "/" & cchpw_punishment & " " & users(i) & " Password incorrect.", True


I've fixed it in my original and the original in your post.


Ok thanks, just to make sure before i run into another problem... Will the plugin freak out if i use timeban 30 /w My_Ops_Bot and take out the auto-invite stuff ??

QUOTE(The-Black-Ninja @ Aug 23 2009, 10:57 PM) *

Username is mispelt here:
CODE
Command BotVars.Usename, "/" & cchpw_punishment & " " & users(i) & " Password incorrect.", True


I've fixed it in my original and the original in your post. As for your edit, you can't call the timeban like that, you have to say:
CODE
Call Event_PressedEnter("/timeban " & whatever syntax is used to timeban someone)



I'm not very good with scripting yet, just minor stuff. Where would i put the
CODE
Call Event_PressedEnter("/timeban " & whatever syntax is used to timeban someone)

at?


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 10:20 PM
Post #7


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



You would need to replace where it has the command BotVars.Username stuff with the Call Event... because you can't call the timeban plugin with the Command function.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 10:29 PM
Post #8


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Ok, I do that. this is the code i used for the timeban
CODE
Call Event_PressedEnter("/timeban " & Username & 30)

I get this when someone joins the channel:
[9:27:03 PM] <To Spiritless_LoF@USWest> Spiritless_LoF@USWest, you have 5 seconds to whisper the Bot the channel's password.(/r <password>)
[9:27:07 PM] Timeban command error: Proper format: .timeban <username> <time>


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 10:53 PM
Post #9


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Close! You forgot to add in a space between their name and the duration.
CODE
Call Event_PressedEnter("/timeban " & Username & " " & 30)


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 10:57 PM
Post #10


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



I got it to almost work with this:
CODE
Call Event_PressedEnter("/timeban " & Username & " 30" & " Password Incorrect. Timebanned for 30minutes.")

I have set my timeban plugin to ("/w My_Ops_Bot .ban" & Username & "Timebanned for " & ban_duration & ".")
Which makes all timeban cmds turn into .ban cmds and be whispered to my ops bot.
When the SB whispers the ops bot to ban the person, all it says is "<to My_Ops_Bot> .ban Password Incorrect. Timebanned for 30minutes."
It doesnt tell the bot WHO to ban, it just leaves a space there...


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 11:04 PM
Post #11


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



K, so replace what you've got with this:
CODE
AddQ "/w OpsBot .timeban " & Username & " 30 Password Incorrect. Timebanned for 30 minutes."


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 11:11 PM
Post #12


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



QUOTE(The-Black-Ninja @ Aug 24 2009, 12:04 AM) *

K, so replace what you've got with this:
CODE
AddQ "/w OpsBot .timeban " & Username & " 30 Password Incorrect. Timebanned for 30 minutes."



Did that. Since NF doesnt have timebanning, i changed the /w OpsBot to whisper the bot with timeban.
It whispes this:

[10:08:09 PM] <To Spiritless_LoF> .timeban 30 Password Incorrect or not given. Timebanned for 30 minutes.
[10:08:09 PM] <From Spiritless_LoF> .timeban 30 Password Incorrect or not given. Timebanned for 30 minutes.
[10:08:09 PM]<To Legion_of_Flame> .ban Password Incorrect or not given. Timebanned for 30 minutes.

Theres an extra space, where the name shoudl be... it has this space here even if i have it whisper to the ops bot with just .ban also


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 11:15 PM
Post #13


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Post the plugin as you have it now please.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 11:16 PM
Post #14


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



CODE
'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF" '// Your Clan Tag
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 5 '// Time (in seconds) users have to enter the password before they are booted

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.(/r

<password>)", Username, vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

If LCase(CT) = Lcase(cchpw_ClanTag) Then Exit Sub

If cchpwUsers.Exists(Username) Then
If Message = cchpw_password Then
cchpwUsers.Remove Username
Dsp 3, "Password accepted. ", Username, vbGreen
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
AddQ "/w Spiritless_LoF .timeban " & Username & " 30 Password Incorrect or not given. Timebanned for 30 minutes."
cchpwUsers.Remove users(i)
End If
Next
End Sub


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 23 2009, 11:26 PM
Post #15


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Ah, I see where I'm going wrong. Replace the Username in that AddQ line with users(i)
CODE
AddQ "/w Spiritless_LoF .timeban " & users(i) & " 30 Password Incorrect or not given. Timebanned for 30 minutes."


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 23 2009, 11:43 PM
Post #16


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Ok. I did that, for some reason, SB was ignoreing the .timeban SO..
i went back
and changes the AddQ to:
CODE
Call Event_PressedEnter("/timeban " & users(i) & " 30 Password Incorrect or not given. Timebanned for 30minutes."

And it works just fine.

I do have one last question. Can I change the cchpe_ClanTag to an array, and add multiple clan tags? I would like it to not requier passwords from clans LoF, DoF, KoF, and SoF If you could change the script to add that i'd really appreciate it.. since I am newb at scripting still, i have no idea how... >.<


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 11:26 AM
Post #17


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



CODE
'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF|DoF|KoF|SoF" '// Clan Tags
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 5 '// Time (in seconds) users have to enter the password before they are booted

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.(/r <password>)", Username, vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If cchpwUsers.Exists(Username) Then
If Message = cchpw_password Then
cchpwUsers.Remove Username
Dsp 3, "Password accepted. ", Username, vbGreen
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
AddQ "/w Spiritless_LoF .timeban " & users(i) & " 30 Password Incorrect or not given. Timebanned for 30 minutes."
cchpwUsers.Remove users(i)
End If
Next
End Sub


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 06:15 PM
Post #18


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Thanks alot. One last problem.. Whenever ANYONE whispers the bot anything. I get this error:
QUOTE
[3:59:43 PM] WhisperFromUser Call Error On File> C:\Program Files\StealthBot\Plugins\cchpw.plug
[3:59:43 PM] Error Number: 424 Description: Object required

And whenever someone not in one of the clans joins the channel, i get same error.

Ok, I seem to have fixed it. In the script u gave me it was using AddQ i changed it to Call Envent_PressedEnter seems to work fine now.. Thanks for the great script!!

Could u help me with the other one i recently requested about the bote-kick/ban ?? happy.gif Thanks for all the help. If i find any more issues with the script I will let you know.


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 06:17 PM
Post #19


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Sorry, I can't reproduce that error.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 06:21 PM
Post #20


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



QUOTE(The-Black-Ninja @ Aug 24 2009, 07:17 PM) *

Sorry, I can't reproduce that error.


Re-read the post please, I dnt know why it was giving error, but somehow changing the AddQ to Call Event fixed it. It also may have been a SB glitch.

Anyways.. One final request7 (i know i said that once already but this is really final for this script)
Is there a way to remember who gives the password correctly within last like 6hrs or something? I have alot of people not from my clan going in and out, most arent in clans, And i JUST realized they will have to type pass everytime... =|


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 06:38 PM
Post #21


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



CODE
'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF|DoF|KoF|SoF" '// Clan Tags
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 5 '// Time (in seconds) users have to enter the password before they are booted
Const cchpw_timeRemember = 6 '// Hours before users will need to re-type the password after they type it correctly

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If cchpwUsers.Exists(Username) Then
If InStr(cchpwUsers.Item(Username), "*") > 0 Then
If DateDiff("s", Split(cchpwUsers.Item(Username), "*")(0), Now) =< 0 Then cchpwUsers.Remove Username
End If
End If

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.(/r <password>)", Username, vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If cchpwUsers.Exists(Username) Then
If InStr(cchpwUsers.Item(Username), "*") > 0 Then Exit Sub
If Message = cchpw_password Then
cchpwUsers.Item(Username) = DateAdd("h", cchpw_timeRemember, Now) & "*"
Dsp 3, "Password accepted. You will be asked to re-type the password in " & cchpw_timeRemember & " hours.", Username, vbGreen
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
AddQ "/w Spiritless_LoF .timeban " & users(i) & " 30 Password Incorrect or not given. Timebanned for 30 minutes."
cchpwUsers.Remove users(i)
End If
Next
End Sub


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 06:48 PM
Post #22


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



QUOTE
[5:45:38 PM] -- Legion_Recruitr [-1ms] has joined the channel using Warcraft III: Reign of Chaos.
[5:45:39 PM] -- Stats updated: Legion_Recruitr [-1ms] is using Warcraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon)
[5:45:42 PM] <To Legion_Recruitr> Legion_Recruitr, you have 10 seconds to whisper the Bot the channel's password.(/r <password>) Your password will be remembered for 6hrs.
[5:45:45 PM] <From Legion_Recruitr> legions
[5:45:45 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[5:45:45 PM] Error Number: 13 Description: Type mismatch
[5:45:46 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[5:45:46 PM] Error Number: 13 Description: Type mismatch
[5:45:47 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[5:45:47 PM] Error Number: 13 Description: Type mismatch
[5:45:48 PM] Timer Call Error On Script: Prefix> cchpw TimerName> CheckUsers
[5:45:48 PM] Error Number: 13 Description: Type mismatch

Everytime someone tries to enter password. >.<


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 06:54 PM
Post #23


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



That's a stupid error, but make this line:
CODE
For i = 0 To UBound(users)
Look like this:
CODE
For i = 0 To UBound(users)
   If InStr(items(i), "*") > 0 Then Exit Sub


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 07:04 PM
Post #24


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



When I reload script after adding that line.
QUOTE

[6:01:05 PM] Load Call Error On File> C:\Program Files\StealthBot\Plugins\cchpw.plug
[6:01:05 PM] Error Number: 13 Description: Type mismatch


Whenever anyone whispers bot (other then password)
QUOTE

[6:01:08 PM] WhisperFromUser Call Error On File> C:\Program Files\StealthBot\Plugins\cchpw.plug
[6:01:08 PM] Error Number: 13 Description: Type mismatch


Whenever someone joins the channel:
QUOTE

[6:01:35 PM] UserJoins Call Error On File> C:\Program Files\StealthBot\Plugins\cchpw.plug
[6:01:35 PM] Error Number: 13 Description: Type mismatch


It's probably me editing it wrong or something, so heres the exact script I have.
CODE

'cchpw
'1.0
'&Custom CHPW:The-Black-Ninja
'&No commands
'&36021
'&Be sure to set the clantag and password within the plugin manually!


Const cchpw_ClanTag = "LoF|DoF|KoF|SoF" '// Clan Tags
Const cchpw_password = "legions" '// Password to enter channel
Const cchpw_timeAllowed = 10 '// Time (in seconds) users have to enter the password before they are booted
Const cchpw_timeRemember = 6 '// Hours before users will need to re-type the password after they type it correctly

Public cchpwUsers

Sub cchpw_Event_Load()

Set cchpwUsers = CreateObject("Scripting.Dictionary")
cchpwUsers.CompareMode = vbTextCompare

TimerInterval "cchpw", "CheckUsers", 1
TimerEnabled "cchpw", "CheckUsers", True
End Sub


Sub cchpw_Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If cchpwUsers.Exists(Username) Then
If InStr(cchpwUsers.Item(Username), "*") > 0 Then
If DateDiff("s", Split(cchpwUsers.Item(Username), "*")(0), Now) =< 0 Then cchpwUsers.Remove Username
End If
End If

If NOT cchpwUsers.Exists(Username) Then
cchpwUsers.Item(Username) = Now
Dsp 3, Username & ", you have " & cchpw_timeAllowed & " seconds to whisper the Bot the channel's password.(/r <password>) Your password will

be remembered for 6hrs.", Username, vbGreen
End If
End Sub


Sub cchpw_Event_WhisperFromUser(Username, Flags, Message)

CT = GetInternalDataByUsername(Username, 0)

clanArr = Split(cchpw_ClanTag, "|")
For Each clan In clanArr
If LCase(clan) = Lcase(CT) Then Exit Sub
Next

If cchpwUsers.Exists(Username) Then
If InStr(cchpwUsers.Item(Username), "*") > 0 Then Exit Sub
If Message = cchpw_password Then
cchpwUsers.Item(Username) = DateAdd("h", cchpw_timeRemember, Now) & "*"
Dsp 3, "Password accepted. You will be asked to re-type the password in " & cchpw_timeRemember & " hours.", Username, vbGreen
End If
End If
End Sub


Sub cchpw_CheckUsers_Timer()

users = cchpwUsers.Keys
items = cchpwUsers.Items

For i = 0 To UBound(users)
If InStr(items(i), "*") > 0 Then Exit Sub

If ABS(CInt(DateDiff("s", items(i), Now))) => CInt(cchpw_timeAllowed) Then
Call Event_PressedEnter("/timeban " & users(i) & " 30 Password Incorrect or not Given."
cchpwUsers.Remove users(i)
End If
Next
End Sub


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 07:24 PM
Post #25


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Your DSP 3 line is messed up where it asks them to type the password.

Your Call Event_PressedEnter is messed up; you're missing an end bracket.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 07:36 PM
Post #26


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Ok, Thanks for that, fixed the Dsp 3 and the Call Event_PressedEnter
It isnt remembering the people who type password tho...
QUOTE

[6:33:02 PM] -- Legion_lol [-1ms] has joined the channel using Warcraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon)
[6:33:03 PM] <To Legion_lol> Legion_lol, you have 10 seconds to whisper the Bot the channel's password.(/r <password>)
[6:33:06 PM] <From Legion_lol> legions
[6:33:15 PM] <To Legion_lol> Password accepted. You will be asked to re-type the password in 6 hours.
[6:33:20 PM] -- Legion_lol has left the channel.
[6:33:22 PM] That user is not logged on.
[6:33:24 PM] <Spiritless_LoF> Legion_lol has logged off battle.net.
[6:33:28 PM] -- Legion_lol [-1ms] has joined the channel using Warcraft III: Reign of Chaos.
[6:33:28 PM] -- Stats updated: Legion_lol [-1ms] is using Warcraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon)
[6:33:28 PM] <To Legion_lol> Legion_lol, you have 10 seconds to whisper the Bot the channel's password.(/r <password>)
[6:33:34 PM] <From Legion_lol> legions
[6:33:44 PM] <To Legion_lol> Password accepted. You will be asked to re-type the password in 6 hours.
[6:33:56 PM] -- Legion_lol has left the channel.
[6:33:57 PM] Legion_lol is using Warcraft III in a private channel.
[6:33:59 PM] <Spiritless_LoF> Legion_lol has joined a private channel.
[6:34:01 PM] -- Legion_lol [-1ms] has joined the channel using Warcraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon)
[6:34:03 PM] <To Legion_lol> Legion_lol, you have 10 seconds to whisper the Bot the channel's password.(/r <password>)
[6:34:08 PM] <From Legion_lol> legions
[6:34:12 PM]<To Legion_lol> Password accepted. You will be asked to re-type the password in 6 hours.



--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 07:44 PM
Post #27


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Try switching
CODE
=< 0
To
CODE
=> 0


I apologize for not being able to test this thoroughly; I only have one key at the moment and I'm using that key for my beta bot in order to get this recruit update out of the way, plus, I don't have anyone willing to join and type passwords to my bot dry.gif


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 07:52 PM
Post #28


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



yay!
It working now. Thanks alot!
And no worries on the testing it, it's ok. It gives me a chance to learn more about scripting =P
Thanks alot The-Black-Ninja.


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Aug 24 2009, 07:54 PM
Post #29


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



smile.gif

I have marked this topic as resolved. If you did not receive a satisfactory response, please reply and provide as much detail as possible.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Spiritless
post Aug 24 2009, 08:08 PM
Post #30


Me 1337 plz??
**

Group: Members
Posts: 58
Joined: 25-July 09
From: My home?
Member No.: 52,816



Umm, ok, It worked on first 5-6 people that joined.. but now it's not timebanning if you don't say password...
QUOTE

[6:59:26 PM] -- The_Black-Mask [31ms] has joined the channel using Warcraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon)
[6:59:27 PM] <To The_Black-Mask> The_Black-Mask, you have 10 seconds to whisper the Bot the channel's password.(/r <password>)
[6:59:27 PM] <Spiritless_LoF Welcome The_Black-Mask to the home Legion of Flame. Your ping is 31. The time is 6:59:27 PM on 8/24/2009. Type .inv if you wish to join.>
[6:59:46 PM] <From The_Black-Mask> legion
[7:00:09 PM] <The_Black-Mask> w00t
[7:00:26 PM] <Spiritless_LoF> wrong password.. but why isnt it banning u...


When someone joins, it's asks them the pass, if they give right password, it says pass accepted. if they trype wrong/no password, it just sits there... and if they rejoin the channel, it doesnt ask them for the password again....


--------------------
IPB Image
-OverLord of Flame Spiritless_One - Legion of Flame -- Welcome to the Legion
www.LoF-Legion.tk
IPB Image
IPB Image

Ѕףﺃѓїtlۼss_Ộ∩
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th July 2014 - 08:33 PM
Skin by Andrea
Website Legal Information | Hosted by LunarPages