| View previous topic :: View next topic |
| Author |
Message |
mikey2 Voice
Joined: 18 Aug 2005 Posts: 19
|
Posted: Fri Aug 19, 2005 3:27 am Post subject: |
|
|
ok...so far so good
Next, I would like to add a 5 min. ban for non-reg. users (after they get the pm, of course). (3) attempts to join in 24 hours without registering gets a permanent ban. |
|
| Back to top |
|
 |
wonka071 Voice
Joined: 27 Aug 2006 Posts: 13
|
Posted: Sun Sep 03, 2006 12:15 pm Post subject: |
|
|
thx for the script
would like to add use /msg NickServ REGISTER yourpassword youremail
to REGISTER
use /msg NIckServ IDENTIFY yourpassword to ID it you are REGISTERED
puthelp "privmsg $n :please identify or register your nick"
Should I added it here ?
}
} |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Sep 04, 2006 12:16 am Post subject: |
|
|
try it and see for yourself, don't wait for somebody to approve your trials _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
wonka071 Voice
Joined: 27 Aug 2006 Posts: 13
|
Posted: Wed Sep 06, 2006 3:52 pm Post subject: |
|
|
changed the script like this
bind join - * foo
proc foo {n u h c} {
puthelp "whois $n"
}
bind raw - 311 got311 ;# first WHOIS reply
bind raw - 307 got307 ;# nick has identified (registered)
bind raw - 318 got318 ;# End of /WHOIS list
proc got311 {f k t} {
set n [lindex [split $t] 1]
set ::whoised($n) 0
}
proc got307 {f k t} {
set n [lindex [split $t] 1]
incr ::whoised($n)
}
proc got318 {f k t} {
set n [lindex [split $t] 1]
if {$::whoised($n) == 0} {
puthelp "privmsg $n :please identify or register your nick" U can register your nick with this (/msg NickServ REGISTER yourpassword youremail) without the ()
Also you can use this to identify yourself if you already registered (/msg NickServ IDENTIFY yourpass) without the ()
}
}
putlog "nickreg loaded"
get this error from the bot
Tcl error [got318]: wrong # args: should be "puthelp text ?options?"
Can somebody help thx |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Sep 06, 2006 4:25 pm Post subject: |
|
|
Please use code-blocks for code snippets.. (and indenting it would also be nice)
The cause for the problem, is that you try to use " in your message without escaping it, thus tcl think it's the end of the string, and starts parsing a new argument.
Quick-fix, put a \ infront of any " within the string (not the ones marking the start and end of string tho) _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
wonka071 Voice
Joined: 27 Aug 2006 Posts: 13
|
Posted: Wed Sep 06, 2006 7:59 pm Post subject: |
|
|
kk changed it to this :
bind join - * foo
proc foo {n u h c} {
puthelp "whois $n"
}
bind raw - 311 got311 ;# first WHOIS reply
bind raw - 307 got307 ;# nick has identified (registered)
bind raw - 318 got318 ;# End of /WHOIS list
proc got311 {f k t} {
set n [lindex [split $t] 1]
set ::whoised($n) 0
}
proc got307 {f k t} {
set n [lindex [split $t] 1]
incr ::whoised($n)
}
proc got318 {f k t} {
set n [lindex [split $t] 1]
if {$::whoised($n) == 0} {
puthelp "privmsg $n :please identify or register your nick U can register your nick with this (/msg NickServ REGISTER yourpassword youremail) without the ()
Also you can use this to identify yourself if you already registered (/msg NickServ IDENTIFY yourpass) without the ()"
}
}
putlog "nickreg loaded"
but this line not showing up
Also you can use this to identify yourself if you already registered (/msg NickServ IDENTIFY yourpass) without the () |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Thu Sep 07, 2006 4:40 am Post subject: |
|
|
*edited* thanks to nml375
Try:
| Code: | bind join - * foo
proc foo {n u h c} {
puthelp "whois $n"
}
bind raw - 311 gotraw ;# first WHOIS reply
bind raw - 307 gotraw ;# nick has identified (registered)
bind raw - 318 gotraw ;# End of /WHOIS list
proc gotraw {f k t} {
global whoised
set n [lindex [split $t] 1]
if {$k == "311"} {
set whoised($n) "0"
} elseif {$k == "307"} {
incr whoised($n)
} elseif {$k == "318"} {
if {$whoised($n) == "0"} {
puthelp "privmsg $n :please identify or register your nick U can register your nick with this (/msg NickServ REGISTER yourpassword youremail) without the ()."
puthelp "privmsg $n :Also you can use this to identify yourself if you already registered (/msg NickServ IDENTIFY yourpass) without the ()."
}
}
}
putlog "nickreg loaded" |
Not tested, but should work. _________________ r0t3n @ #r0t3n @ Quakenet
Last edited by r0t3n on Thu Sep 07, 2006 5:25 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Sep 07, 2006 1:26 pm Post subject: |
|
|
@Tosser^^: Keep track of your variable names.. (no variable named arg defined anywhere within "gotraw").
@wonka071: You can't insert newlines in privmsgs.. you'll have to issue another | Code: | | puthelp "PRIVMSG $n :blah..." | for the second line if you want it on a separate line... (see Tosser^^'s example on this). And once again, please use [ code] [/code]-blocks when you post code... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|