egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting user mode to +R for all my bots
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Sloop
Halfop


Joined: 12 Jul 2005
Posts: 44

PostPosted: Wed Jul 20, 2005 5:12 pm    Post subject: Setting user mode to +R for all my bots Reply with quote

Hi there,

I just thought about setting all my bots with usermode +iR
what do u think? I mean, it's a little bit secure to protect them for floods by non-registered nicknames or something like that.

I tried to search the .conf file and the console commands, but I did not found any possibility to give my bot the command to use this desired user mode +iR

Anyone can tell me how to do that? Maybe I can do somehow with netbots.cl ??
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Jul 20, 2005 5:24 pm    Post subject: Reply with quote

In eggdrop.conf:
Code:
# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putquick "MODE $botnick +iR-ws"
}

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Jul 24, 2005 1:16 pm    Post subject: Reply with quote

usermode +R will require the bot to be auth'd to whatever chanserv your network uses, so don't neglect to either load a seperate botnick identification tcl, or include in your bots' auth info in the evnt:init_server procedure Mr. Green
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Sloop
Halfop


Joined: 12 Jul 2005
Posts: 44

PostPosted: Sun Jul 24, 2005 1:41 pm    Post subject: Reply with quote

Hi YooHoo and thanks for your clue, but I don't knoe exactly how to do that, above all my authentification script does not work very well. I have really tried a lot of scripts, and now I have loaded the chanservneed.tcl for which I had to enter the ChanServ and NickServ service and my passwords, and also to create two users ChanServ and NickServ as eggdrop user with the specified flags as described in the documentation of chanservneed.tcl

The ident process works fine, but sometimes (I dunno when exactly this problem occurs) I am getting following problem:

botname changed to botname_3
botname_3 changed to botname_8
botname_8 changed to botname

now I thought it will remain here, but this [censored] continues:

botname changed to botname_7

and so on and so on ... I then have to kill my botname eggdrop process from my shell, then do a "/msg nickserv release botname password" and afterwards restart this bot again.

Do you know what's wrong?? I also searched this chanservneed.tcl for the "evnt:init_server" code, but didn't find anything. Currently I am loading with netbots.tcl first the chanservneed.tcl and afterwards the usermodes.tcl which I created myself and pasted the code of Alchera.

Hope someone can help.
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Jul 24, 2005 2:19 pm    Post subject: Reply with quote

I'm not a big fan of bloated botnick auth scripts Laughing I tend to go with the simplest solution that works. Copy this example, replacing the relevant information Wink
Code:
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putserv "PRIVMSG $nickserv: AUTH my_password"; MODE $botnick +iR-ws"
}
replace the putserv line with the correct info for your network and bot, this will ensure that your bot identifies to nickserv upon connecting to the server. There is another procedure next to init-server simply named connect-server. Make the putserv line in both of these procedures identical, and you shouldn't have anymore probs Wink
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Jul 24, 2005 2:22 pm    Post subject: Reply with quote

oops, i left 1 too many double-quotes "
corrected code:
Code:
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putserv "PRIVMSG $nickserv: AUTH my_password; MODE $botnick +iR-ws"
}
Mr. Green
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Jul 24, 2005 6:07 pm    Post subject: Reply with quote

YooHoo wrote:
Code:
putserv "PRIVMSG $nickserv: AUTH my_password"


Check your network's NickServ for the format to identify as suggested by YooHoo. Some do not use AUTH but use IDENTIFY; also change to:
Code:
putserv "PRIVMSG $nickserv :AUTH my_password"

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Jul 24, 2005 6:42 pm    Post subject: Reply with quote

Sloop wrote:
The ident process works fine, but sometimes (I dunno when exactly this problem occurs) I am getting following problem:

botname changed to botname_3
botname_3 changed to botname_8
botname_8 changed to botname

now I thought it will remain here, but this [censored] continues:

botname changed to botname_7

and so on and so on ... I then have to kill my botname eggdrop process from my shell, then do a "/msg nickserv release botname password" and afterwards restart this bot again.

Do you know what's wrong??
most likely nickserv is forcing your eggdrop to change to its altnick because a)some form of modnick protection is active or b)the botnick you have chosen for your bot either is taken by someone/thing else.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Mon Jul 25, 2005 5:32 am    Post subject: Reply with quote

if you want a nice auth script use the Qauth.tcl script (googlable) and change the line where the auth cmd is being send (provided your network uses a different format etc). the tcl checks if you are authed and also upon disconnect/reconnect re-auths.
Back to top
View user's profile Send private message
Sloop
Halfop


Joined: 12 Jul 2005
Posts: 44

PostPosted: Mon Jul 25, 2005 6:19 pm    Post subject: Reply with quote

hi @ll,

as mentioned before I have big problems to identify my bots to my IRC-Network (=GRNet which runs Bahamut-IRCd v1.4(34). I tried a lot of scripts but somehow it does not work like I want. Also the simple procedure as described by YooHoo (to enter a "...PRIVMSG nickserv :IDENTIFY ...." command in the init-server section of .conf file) is not very fine, because this works only if it connects fresh to a server. Somehow I get in trouble because my botnick is taken by NickServ and looks like this:

• Whois info for ChanProtect (Normal)
• Full name : NickServ Enforcement
• Address : enforcer@irc.gr - Greece
• Channels : #enforcers - 1 Channel (1Reg)
• Server : services.irc.gr - GRNet Services HomeBase
• End of whois info for ChanProtect

So I need a "/msg nickserv release password" to release this first, and afterwards I send a "/nick mybotnick" because if you do not identify correct within the time period specified on Nickserv, you are automatically changed nickname to XXX-1234567890 (XXX-* *=a long number)) and then afterwards I identify with "/msg nickserv identify password"

I found best for my fits the script CHANSERVNEED.TCL
I tried to adjust the script to my IRC network, but I don't know, something is not working fine. Maybe you can help when I post the code and my log because I cannot TCL and I do not understand everything and so cannot find the error or problem.

Well, this is the original script http://www.egghelp.org/tclhtml/3478-4-0-0-1-chanservneed.htm

Just a few words to what I changed:

- changed the nickservmask and chanservmask as described in the file
- renamed DALnet into GRNet and adjusted the text I think my server returns. I have shrinked the text, for better chance to recognize it, that's why I also use asterisk * as wildcard in beginning and end of sentence.
- removed the "default" network, because I only need GRNet I think?


Code:

set nickservmask "PRIVMSG NickServ"^M
set chanservmask "PRIVMSG ChanServ"^M
set nickpass "mypassword"^M
^M
# set this to 0, if you want to use the serverpass for serverinit auth^M
set initservpassneeded 1^M
^M
# change these only if network uses other strings than these^M
# the set lines are the bind mask for rejoin^M
switch $network {^M
        GRNet {^M
                bind notc f "*nickname has been registered*" handle:nickneed^M
                bind notc f "*Password accepted*" handle:nickauthed^M
                bind notc f "*has been killed*" handle:nickchange^M
                bind notc f "*Nickname changed to \002XXX-*" handle:deguest^M
                bind notc m "*Permission denied*" handle:permneed^M
^M
                set joinbindunban "*have been unbanned from \002\$channel\002*"^M
                set releasebind "*has been released*"^M
                set noreleasebind "*Nick \002$nick\002 isn't being held*"^M
        }^M
}^M
^M
#^M
# End of configuration^M
#^M
bind need - "*" handle:need^M
bind evnt - init-server handle:serverinit^M
#you can enable that to use an encrypted password above^M
#bind evnt - loaded handle:loaded^M
bind dcc m nsfix handle:nsfix^M
bind raw - 601 {handle:servwatch 0}^M
bind raw - 605 {handle:servwatch 0}^M
bind raw - 604 {handle:servwatch 1}^M
bind raw - 600 {handle:servwatch 1}^M
bind raw - 440 {handle:servwatch 0}^M
set nickauthed 0^M
set serviceson 1^M
set joinbindunban "set bind \"$joinbindunban\""^M
^M
proc handle:need {channel need} {^M
  global botnick chanservmask^M
  if { !$::serviceson || [string match -nocase XXX-* $botnick] } {      return 0 }^M
  switch $need {^M
    op {^M
      if {![matchattr chanserv "|l" $channel]} { return 0 }^M
      if {![matchattr chanserv "|o" $channel]} {^M
        putquick "$chanservmask :halfop $channel $botnick"^M
      } else {^M
        putquick "$chanservmask :op $channel $botnick" -next^M
        if { [matchattr chanserv "|m" $channel] } {^M
                putquick "$chanservmask :admin $channel $botnick"^M
        }^M
      }^M
      return 1^M
    }^M
    unban {^M
      if { [matchattr chanserv "|m" $channel] } {       #just to stop bot fighting in chans he has "only" op^M
putquick "$chanservmask :unban $channel" -next^M
        eval $::joinbindunban^M
        bind notc m $bind [list handle:join $channel $bind]^M
        return 1^M
      }^M
      return 0^M
    }^M
    limit  -^M
    key    -^M
    invite {^M
      if { [matchattr chanserv "|o" $channel] } {^M
        putquick "$chanservmask :invite $channel" -next^M
        return 1^M
      }^M
      return 0^M
    }^M
  }^M
}^M
^M
proc handle:join {chan bind nick uhost hand text dest} {^M
        if { $hand == "chanserv" && $::serviceson } {^M
                putquick "JOIN :$chan"^M
                unbind notc m $bind [list handle:join $chan $bind]^M
        }^M
        return 0^M
}^M
^M
proc handle:nickneed {nick uhost hand text dest} {^M
  global nickservmask nickpass nickauthed^M
  if { $hand == "nickserv" && $nickauthed == 0 } {^M
        set nickauthed 2^M
        set serviceson 1^M
    putquick "$nickservmask :IDENTIFY $nickpass" -next^M
    utimer 20 [list set nickauthed 0]^M
  }^M
}^M
^M
proc handle:permneed {nick uhost hand text dest} {^M
  global nickservmask nickpass nickauthed^M
  if { $hand == "chanserv" && $nickauthed == 0 } {^M
        set nickauthed 2^M
    set serviceson 1^M
    putquick "$nickservmask :IDENTIFY $nickpass" -next^M
    utimer 20 [list set nickauthed 0]^M
  }^M
}^M
^M
proc handle:nickauthed {nick uhost hand text dest} {^M
  global nickauthed^M
  if { $hand == "nickserv" } {^M
    set nickauthed 1^M
    putlog "NickServ accepted identification."^M
    utimer 120 [list set nickauthed 0]^M
  }^M
}^M
^M
proc handle:nickchange {n host h t d} {^M
        global nick nickauthed^M
        if { $h == "nickserv" } {^M
                putquick "NICK $nick" -next^M
               if { $nickauthed == 1 } {^M
                        bind nick - "*$nick" handle:nickchangeauth^M
                }^M
                set nickauthed 0^M
        }^M
}^M
^M
proc handle:nickchangeauth {n host h c nn} {^M
        global nick nickpass nickservmask^M
        putquick "$nickservmask :IDENTIFY $nickpass" -next^M
        unbind nick - "*$nick" handle:nickchangeauth^M
        return 0^M
}^M
^M
proc handle:serverinit {type} {^M
        global nick nickpass nickservmask nickauthed initservpassneeded^M
        set nickauthed 2^M
        if { ![isbotnick $nick] } {^M
                putquick "$nickservmask :GHOST $nick $nickpass" -next^M
        } elseif { $initservpassneeded } {^M
                putquick "$nickservmask :IDENTIFY $nickpass" -next^M
        }^M
        putserv "WATCH +NickServ +ChanServ"^M
        return 0^M
}^M
^M
proc handle:loaded {evnt} {
    global qauth
    set ::nickpass [decrypt $::nickservmask $::nickpass]
    return 0
}^M
^M
proc handle:release {n host h t d} {^M
        if { $h == "nickserv" } {^M
                set nickauthed 1^M
                putquick "$::nickservmask :RELEASE $::nick $::nickpass" -next^M
                bind notc f $::releasebind handle:deguest^M
                bind notc f $::noreleasebind handle:deguest^M
        }^M
        return 0^M
}^M
^M
proc handle:deguest {n host hand text dest} {^M
        if { $hand == "nickserv" } {^M
                putquick "NICK $::nick" -next^M
                catch {unbind notc f $::releasebind handle:deguest}^M
                catch {unbind notc f $::noreleasebind handle:deguest}^M
        }^M
}^M
^M
proc handle:servwatch {status from keyword arg} {^M
        if { $keyword == 440 } {^M
                set ::serviceson $status^M
        } else {^M
                set arg [split $arg]^M
                set nick [lindex $arg 1]^M
                set uhost "[lindex $arg 2]@[lindex $arg 3]"^M
                set nickserv [split [lindex [getuser nickserv HOSTS] 0] !]^M
                set chanserv [split [lindex [getuser chanserv HOSTS] 0] !]^M
if { ([string match -nocase [lindex $nickserv 0] $nick] && [string match -nocase [lindex $nickserv 1] $uhost]) || ([string match -nocase [lind
ex $chanserv 0] $nick] && [string match -nocase [lindex $chanserv 1] $uhost]) } {^M
                        set ::serviceson $status^M
                }^M
        }^M
        return 0^M
}^M
^M
proc handle:nsfix {hand idx text} {^M
        if { $::serviceson || [string match -nocase "*-force*" $text] } {^M
                set ::serviceson 1^M
                if { [isbotnick $::nick] } {^M
                        putdcc $idx "Sending auth to NickServ..."^M
                        putquick "$::nickservmask :IDENTIFY $::nickpass"^M
                } else {^M
                        putdcc $idx "Requesting release of primary nick..."^M
                        uplevel #0 {handle:release n h nickserv t d}^M
                }^M
        } else {^M
                putdcc $idx "I see the Services offline, if you are sure that they are online use -force as argument."^M
        }^M
}^M
                ^M
^M
putlog "ChanservNeed v1.4.2 loaded"^M




And here you see what the console of my bot says while this [censored] happens:

Quote:

[00:09] Connected to global.irc.gr
[00:09] -NOTICE- *** Looking up your hostname...
[00:09] -NOTICE- *** Found your hostname
[00:09] -NOTICE- *** bla bla bla bla here follows the MOTD and so on
[00:09] -NOTICE- *** Your host is global.irc.gr[@0.0.0.0], running version bahamut-1.4(34)+greeklish+j1
[00:09] -NOTICE- *** Notice -- motd was last changed at 7/6/2004 22:34
[00:09] -NOTICE- *** Notice -- Please read the motd if you haven't read it
[00:09] -NOTICE- *** Notice -- This server runs an open proxy monitor to prevent abuse.
[00:09] -NOTICE- *** Notice -- If you see connections on various ports from otrere.irc.gr
[00:09] -NOTICE- *** Notice -- please disregard them, as they are the monitor in action.
[00:09] -NickServ (service@irc.gr)- This nickname is registered and protected. If it is your
[00:09] -NickServ (service@irc.gr)- nick, type /IDENTIFY password. Otherwise,
[00:09] -NickServ (service@irc.gr)- please choose a different nick.
[00:09] -NickServ (service@irc.gr)- If you do not change within 20 seconds, I will change your nick.
[00:09] -NickServ (service@irc.gr)- This nickname has been registered; you may not use it.
[00:09] -NickServ (service@irc.gr)- Your nickname is now being changed to XXX-19213808979780
[00:09] Nickname changed to 'XXX-19213808979780'???
[00:09] Switching back to nick ChanProtect
[00:09] NICK IN USE: ChanProtect (keeping 'XXX-19213808979780').
[00:10] Switching back to altnick ChanProtect
[00:10] NICK IN USE: ChanProtect (keeping 'XXX-19213808979780').
[00:11] Switching back to altnick ChanProtect
[00:11] NICK IN USE: ChanProtect (keeping 'XXX-19213808979780').
[00:12] Switching back to altnick ChanProtect
[00:12] NICK IN USE: ChanProtect (keeping 'XXX-19213808979780').
[00:13] Switching back to nick ChanProtect
[00:13] Regained nickname 'ChanProtect'.
[00:13] -NickServ (service@irc.gr)- This nickname is registered and protected. If it is your
[00:13] -NickServ (service@irc.gr)- nick, type /IDENTIFY password. Otherwise,
[00:13] -NickServ (service@irc.gr)- please choose a different nick.
[00:13] -NickServ (service@irc.gr)- If you do not change within 20 seconds, I will change your nick.
[00:13] -NickServ (service@irc.gr)- This nickname has been registered; you may not use it.
[00:13] -NickServ (service@irc.gr)- Your nickname is now being changed to XXX-8213809380002
[00:13] Nickname changed to 'XXX-8213809380002'???
[00:13] Switching back to nick ChanProtect
[00:13] NICK IN USE: ChanProtect (keeping 'XXX-8213809380002').


and this goes on and on ... Sad I have to manually kill the bot process, then do a "/msg nickserv release password" wait a little bit, and then restart my bot and hope that he gets connected Sad

I would be very very glad and appreciate it if someone could help me out there, as I do not know TCL scripting and therefore do not how to solve my problem.

Big and thousand thanx to everyone in advance !!!!!
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jul 25, 2005 7:58 pm    Post subject: Reply with quote

You've used a windows editor for a start; bad move.

I use a simple auto identify script for my bots (on DALnet) which uses Bahamut's 'watch' and I've never had a drama with it in over 4 years.

The script has the bot identify to NickServ every time NickServ is detected i.e. on connect or when services return after being down.

You can download the script from here. The only thing that needs editing is the following:
Code:
set nickservicename "NickServ@services.dal.net"

Change the address as appropriate for your network using Notepad.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Sloop
Halfop


Joined: 12 Jul 2005
Posts: 44

PostPosted: Mon Jul 25, 2005 9:31 pm    Post subject: Reply with quote

Hi Alchera,

no I didn't edit it in Windows, I only use Linux but I was wondering myself about all the ^M ????

anyway... I tried your script, it works but unfortunately I got the same problem sometimes. I even don't know why this occurs, maybe because of netsplits or something like that. But then eggdrop won't identify again. I have also to restart the server and to manually a "/msg nickserv release password"


I dunno what else to try Sad I thought the chanservneed.tcl would be the best one for my needs, but I have to get it work correctly first, and that's why I asked someone who knows TCL scripting if he can check the code and everything is ok or point me to the errors.

Anyhow BIG BIG THANX FOR YOUR EFFORT MAN.

Greetinx,
Sloop
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jul 25, 2005 9:46 pm    Post subject: Reply with quote

Quote:
[00:09] Nickname changed to 'XXX-19213808979780'???
[00:09] Switching back to nick ChanProtect
[00:09] NICK IN USE: ChanProtect (keeping 'XXX-19213808979780').
[00:10] Switching back to altnick ChanProtect

That's curious. You have both the bots main nick and alternate nick set the same i.e. ChanProtect?

If so, I'd suggest picking a different alternate nick; ChanProtect` for instance. The "NICK IN USE" bit indicates your bots nick is still online as a ghost.

You should also fix up the access list in NickServ, that usually solves a few problems.

NB: the ^M is an EOL character from memory. You best use pico or vi for editing TCL scripts.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Sloop
Halfop


Joined: 12 Jul 2005
Posts: 44

PostPosted: Tue Jul 26, 2005 7:52 am    Post subject: Reply with quote

Alchera, I HAD the alternate nickname before to ChanProtect_? but the same [censored] happened, it changed from nickname to alternater_nick and so on. After that I thought about setting the altnick to the same as the botnick, but it didn't help. I do NOT HAVE access lists for my nicks on nickserv, they can log-in from everywhere.

I edit everything with 'vi' but I dunno why this error still occured. Maybe I'll try pico next time.

Damn it, I still don't know why this happens and how to fix it. Anyone can check my script code?
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Wed Jul 27, 2005 1:20 am    Post subject: Reply with quote

why not just unload that lame script? or maybe just turn off that feature?
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber